Hi
In dispatcher i need to clear the cache for a component which basically reads a value which will be incremented in publish Mode.But because of the caching in the dispatcher mode, old values are retreived. But the component functionality works fine in publish mode.
EX: Suppose a value get incremented on clicking a button, I need to display the value based on the counter.
IN Publish: Most recent update is rendered.
But in dispatcher: Old values are getting rendered because of the caching.Suppose if i append somethng like http://sample.com?1234
then since the url is not cached,then the component displays the most recent entries.
So is there a way to disable the caching for ceratin pages in dispatcher mode
Solved! Go to Solution.
Views
Replies
Total Likes
Well you could also do as you did in your first post. This is usually how CQ/AEM solves the problem with some includes that it don't want to be cached. Eg. in the javascript api there are methods for this where it simply adds a timestamp (as a querystring) to links that are supposed to be non-cachable. So your original solution seems like the right approach there if you don't want to configure the dispatcher.
/Johan
Views
Replies
Total Likes
Hi punith this is absolutely possible.
In the dispatcher.any file there is a caching section where you tell the dispatcher what to cache. In the rules section you could add this:
/rules { /0000 { /glob "*" /type "allow" } /0001 { /glob "/path/to/noncachablefile*" /type "deny" } }
This first allows everything but later denies caching for your certtain file.
Good Luck
/Johan
Views
Replies
Total Likes
To add to what Johan said, here are some links to the docs:
scott
Views
Replies
Total Likes
Thanks Johan and Scott,
But is there any way, though which the same can be achieved programatically.
Thanks
Views
Replies
Total Likes
Well you could also do as you did in your first post. This is usually how CQ/AEM solves the problem with some includes that it don't want to be cached. Eg. in the javascript api there are methods for this where it simply adds a timestamp (as a querystring) to links that are supposed to be non-cachable. So your original solution seems like the right approach there if you don't want to configure the dispatcher.
/Johan
Views
Replies
Total Likes