This content has been marked as final. Show 8 replies
Maybe my problem is the page is getting cached so that when the user requests the page again it doesn't run my session.clearCacheLink variable and doesn't reset the cache. Does this make sense?
When the browser caches a page, it doesn't re-request the page from the server until the timespan has passed.
Hmmm... then how do I force it to be re-requested. <cfcache action="flush"> isn't working for me and I tried a <cfcache with a negative timeout, that didn't work either. When the cache is flushed does it do it for the entire site, or only in the directory that the code is run in. In my case they are in two different directories. Thanks for your help.
> then how do I force it to be re-requested.
You can't. If you send a page to a browser that allows caching (the page, not the browser), and you specify a cache timeout, that page won't be re-requested no matter what you do on the server. Your only option is to wait until the cache timeout passes.
If that isn't acceptable, then don't allow caching of your pages. That way, the user's browser re-requests the page every single time it is accessed.
There must be some way to do this. <cfcache action="flush"> seems to be the answer but it doesn't work for me. What is this supposed to do? Does it only flush server-side caching? Could I cache something on the serverside even though there are dynamic variables that dictate the content of the page? I remember hearing that client side caching should be used in this instance. We have a CMS used for the management of may sites and some clients have more than one site with us. In a perfect situation when they change their site id, I would flush the cache so that their individual pages would be processed and delivered properly (otherwise they get the cached page of the previous site). Any other ideas are greatly appreciated.
Read the 2nd paragraph of this page:
"Use this tag if it is not necessary to get dynamic content each time a user accesses a page."
If you have a page that is accessed with the same exact URL, but displays different content, then you simply can't use <cfcache>.
Thanks Kronin, its sad news but at least it is difinitive.
i dun quite understand how flush works.
at first, an action="cache" will create a new cache(.tmp) on the server, then,
after the action="flush", the cache(.tmp) on server will replace with a new one?