URGENT: ColdFusion 11 Cache not working as expected

I cannot seem to clear the template cache. No matter what I do, the same data remains from my cfquery example below. I've tried all possible combinations found in CF Administrator's Server Settings > Caching settings to release the query cache, EVERY option but nothing releases the cached query.

In ColdFusion 8 I was able to set "Maximum number of cached queries" from, say 200 to 1, which would clear the cache set in my CachedWithin setting.  Now, in ColdFusion 11, this does not seem work as I expected at all. It must be my lack of understanding but I've spent far too much time attempting to understand, read so many links to pages with discussion I cannot understand.

I would have thought that clicking one of the Clear Cache buttons in CF Administrator's Server Settings > Caching settings would clear the cache but it does not, even when that page looks like the screenshot I attached.

See the attached screen shot of CF Admin.

My cached query will only be cleared when I remove (or sometimes edit) the "cachedWithin" statement on the query.


<cfquery name="StoryInfo" datasource="anews" cachedWithin="#CreateTimeSpan(0, 0, 1, 0)#">
  select top 50 *
  from storybook
  where online = 1
  order by id desc

I'll settle for removing all cached queries, system wide, when we add a new story and want it to be seen, and just as quickly as I did in CF8. But this new version of CF11 seems beyond me. I am not a  programmer but subbing for the one who died. I've read so many examples on the net but they assume I know more than I do which is quite frustrating.

The DOCS from Adobe seem written in nearly another language.  So, all I've been able to do is experiment.  I mean, all I want to do is remove the cache system wide so my changes will take effect and be seen, and without having to edit the CachedWithIn setting. Having to edit the cfquery seems pretty lame, no doubt my confusion and lack of understanding.

So, would someone please read this carefully and show me where I'm going wrong? This must be something very  simple I'm not understanding.
Grover McBroomAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

erikTsomikSystem Architect, CF programmer Commented:
Also I would recommend clearing the template cache and query cache by clicking Clear Query cache now.  Also you will need to remove cachedWithin from the queries.  Also please check application.cfm or application.cfc file if there any mentions about cache.

Please read this

Also I would clear a browser cache as well
Grover McBroomAuthor Commented:
erikTsomik >

Thanks for looking into this.

Absolutely not a browser cache problem.

As I said in my original question, I tried all the Clear Cache buttons in CF Admin and as I said, noe of them with any settings cleared the cache. None. I mean, why are they there if they will not clear any cache?

> Also you will need to remove cachedWithin from the queries.

Yes, that's the gist of my question, that I am being forced to edit and remove all existing cached queries that contain data that needs updting, that is, forced to remove the "cachedWithin" setting altogether.

We have hundreds of such "cachedWithin" settgings. Surely either I don't understand what you mean, or you don't understand my question or I phrased it wrong, I have to hope so!  This cannot be the case, having to edit and  remove each "cachedWithin" code just to clear cached queries. I'm sure you'll agree that would be ridiculous.

My application.cfm file does not contain any "cachedWithin" settings at all.

As far as the link you have, I already saw it long ago. I did place it onto a separate page to run:

<cffunction name="onRequestStart" hint="">
<cfif structKeyExists(www.domain.com/news/news1.cfm, "reinit")>
<cfset cacheRemoveAll()>

When run there is no feedback and no query cache is cleared.

Would you use my example query and give me code based on it to clear the cache? Also, let me know where to place it, in a file by itself and if needs to use a URL, use the one I gave. I also tried it without the URL.

Nothing is working. Hope that helps you.
Grover McBroomAuthor Commented:
Looks like I stumbled onto a answer in the Adobe forums to simply use this bit of code on a separate page.

<cfobjectcache action = "clear">

That works for me and that's really all I need. Yes, it's system wide but that's okay as long as the cache then continues to cache data at that point. The problem was urgent so I needed anything that would work even if it was system wide. I'll have to figure out the particulars on how to be more specific, later.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Grover McBroomAuthor Commented:
Found workable solution myself.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.