1

I am currently investigating issue related to Sitecore Caching. I have a controller with action filter attribute set for setting up the cookies, whenever any action of controller is called.

The Sitecore rendering is set to without any caching - none of cache check box are checked on the rendering. When I am testing this action in other environments (DEV, QA and UAT), I can see the cookies are getting set with action filter attribute.

However, no cookies is being set in production. I have put some logs to test the behavior in production and logs in the controller constructor and action were not been logged.

Sitecore Version 8.0 update 6

enter image description here

Action filter logs are getting executed only when query string parameters in the urls changed. Update 1

The functionality is to set the cookies based on query string parameters. All these cookies are being set in action filter class. Whenever I change the query string parameters I can see the controller, actions are being logged and cookies are getting set as expected.

However when I clear cookies from browser and request the same url again, I dont see anything gets logged and action filter doesn't get executed. Seems the response of the rendering is getting served from cache if same url requested again.

the main query is why rendering is getting cached, despite of setting it as not cacheble?

10
  • Do your requests even hit the server? Or are they cached in the browser and never sent to the server?
    – Marek Musielak
    Feb 26, 2018 at 9:26
  • @MarekMusielak yes, request is hitting the server. I have deployed code after taking server out of the load-balancer pool. Even after deploying new dll my logging code in constructor and action method is not logged. Feb 26, 2018 at 9:46
  • No log from constructor? It seems like the wrong code is deployed. Try to download and decompile the dll and see if your code is there for sure
    – Marek Musielak
    Feb 26, 2018 at 10:14
  • 2
    A a hidden element to the cshtml and insert the DateTime.Now. Then you can see if it is really caching or not.
    – Chris Auer
    Feb 26, 2018 at 14:01
  • 2
    Is any of the parent components cached?
    – Marek Musielak
    Feb 26, 2018 at 14:13

1 Answer 1

4

It may happen if a parent component is cached.

In that situation all the children components inside the parent component are rendered from cache as well and their code is never executed again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.