.net - Advice to implement cache solution for a site -


i'm working on public site not longer 100% public. paid users able access 100% of features while "anonymous" users access reduced version.

the problem anonymous users , paid users access same pages, they'll see different things.

i wonder how keep using cache pages. have 100% sure show correct content each type of user. extremely bad show cached version of paid site anonymous user (and other way around).

preferably, without adding url differentiate user type.

thanks!

you can use application cache business data, dictionary of key value pairs, can put into. can programatically check if they're logged in. you'll still rendering page on each visit, retrieving cached data provide required performance boost.

alternatively, might possible turn off output-cache programatically, described in question.

quote this answer david ebbo:

in oninit:

if (yourarbitrarycondition) {     outputcacheparameters outputcachesettings = new outputcacheparameters();     outputcachesettings.duration = 60;     initoutputcache(outputcachesettings); } 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -