[RESOLVED]OutputCache changed , doesn't work correctly

Hi, I’m using output cache on my website. Before output cache was working for all request in duration time correctly. Even f5 reloads, ctrl+f5 reloads didn’t reinstalls pages.  All pages was static until duration time ends. But suddenly it’s changed working
style on local and server. Now its working only click requests or directly enters but, If i try with f5 or ctrl + f5 OutPut Cache not working. Making new request and regenerate page again. 

here is my code, i tried also location parameter but it doesnt work. Is there any configuration changes server update? is there any solution for this issue? 

   [OutputCache(Duration = 1000, VaryByParam = "language;CatalogURL;CatalogURL2;CatalogURL3;CatalogURL4;CatalogURL5;productDetailURL;CatID;_;OldProductCode;OldProductName;OldCategoryUrl1;OldCategoryUrl2;", Location = System.Web.UI.OutputCacheLocation.Any)]

Hi,

Do you have any other machine, where the cache works as you require? This would be useful to compare the things from working-machine to not-working machine.

You can read more about F5 and Ctrl F5 here:

http://stackoverflow.com/questions/385367/what-requests-do-browsers-f5-and-ctrl-f5-refreshes-generate

Hi vectorman,

First, please create a new project and try again to check the result. You may share the project on the OneDrive.

Secondly, please use the developer tool to check the status for the request.

On the other hand, please cache the data in the client.

Location = OutputCacheLocation.Client

Best Regards

Starain Chen

Hi, i fixed the problem, But this was very interesting issue. I was using OutputCache with another ActionFilter Attribute  and my ActionFilter attribute was trying the write cookie. In debug there is no error everytings looks normal but maybe cause hidden
error because its works every request. I removed this cookie line and it worked good.  Maybe cookie writing is slow and changing every request, maybe every request cannot be done and trying write above previous request.

I think output cache is sensitive hidden, serverside or http header errors. If somethings goes wrong (Even we don’t see and doesn’t throw exception) OutPutCache is not works. I have VaryByParam parameters only in the right way it cannot be effect f5 or ctrl+f5.
 have to return always static content in duration time.

EveryBody have to be careful using outputcache with another actionfilters and  cookies.

now it’s working correctly ! thank you very much.

Hi Vectorman,

Glad that you figured out the solution and thanks for your time in explaining the solution. This will definitely help others facing the similar issue!

Leave a Reply