Disable the cache

Permalink Browser Info Environment
Hello,
I'm experiencing a problem due to the fact that the add-on is caching already loaded pages.
The pages I'm loading get data from session variables that might change anytime so with cached pages, the changes are not reflected.

Is there a way to disable the cache or even better to leave the cache on but refresh only certain blocks in the area?

Many thanks
Nour

Type: Discussion
Status: New
mnakalay
View Replies:
Tony replied on at Permalink Reply
Tony
oh ok, I've never had a user have to disable that before but it should be pretty easy to do.

open up the view.js file for that block, and replace this:

this.getJSONCache = function(key){
return this._cache[key] || null;
}

with this:

this.getJSONCache = function(key){
return null;
}

so that it always returns null. let me know how that works for you. thx
mnakalay replied on at Permalink Reply
mnakalay
hi,
thanks for the very fast answer.
That should partially do the trick but since the script is used with other pages that don't require to disable the cache, what I wanted to know was how to do it selectively.

If there is no way and if you are not going to bring any critical update to the add-on javascript any time soon; I think with what you already gave me, I could modify it myself but i'd like to make sure first
mnakalay replied on at Permalink Reply
mnakalay
nevermind, I solved the problem.
Thanks again for your help

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.