A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
search
AI OnAI Off
Hello
We are using output cache for current application but for some requests we dont want to response with outputcached content i.e request must hit our business logic. I now that I can use varybyprarams and headers but this will generate a lot of outputcached content and there is a 'risk' to use a lot of memory so we have tried another apporach...
What we have tried is in PageInit of our master page we do:
Response.Cache.AddValidationCallback(new HttpCacheValidateHandler(ValidateCacheOutput), null);
and ValidateCacheOutput-delegate looks like:
public static void ValidateCacheOutput(HttpContext context, Object data, ref HttpValidationStatus status)){
{
if (
status = HttpValidationStatus.IgnoreThisRequest;
}
}Submit
This works fine but it looks like if user are not logged in and user hits: status = HttpValidationStatus.IgnoreThisRequest;
It will not respond with already saved output cached content but...
it will go into business logic for current page and generate new outputcahced content that 'not logged in people' will get when visiting site....my mainproblem is that if-condition must also apply for not logged in visitors else it could have been working so....
Is there a way to tell Episerver to not generate outputcached content for current request (of page) if contidion is fullfilled.
Would be glad if anyone could help me solving this or point me in right direction how to approach this problem
[Pasting files is not allowed]