Highlighted

Cache, ColdFusion (11,0,18,314030)

Community Beginner ,
Mar 18, 2019

Copy link to clipboard

Copied

I use cache throughout my site. I am using CachePut, CacheGet,... Since I updated to update 17 I can see that cache gets flushed every couple of minutes even I have set it up for day or longer. Cache is getting created on first call and after refreshing the page content is written from cache. But after couple of minutes cache is flushed and everything starts from beginning. Not sure if there ia any settings that I missed. The code didn't change and it was working for years. I updated to update 18 restarted the server but the issue is still there. What can caused the cache to be flushed? Thanks. Slaven

It looks similar to an issue CF-4204066 reported in ColdFusion 11 Update 18. The fix for both the issues will remain the same.

Please contact cfsup@adobe.com to get the hotfix for this issue.

-Nimit

ColdFusion Team

Views

633

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Cache, ColdFusion (11,0,18,314030)

Community Beginner ,
Mar 18, 2019

Copy link to clipboard

Copied

I use cache throughout my site. I am using CachePut, CacheGet,... Since I updated to update 17 I can see that cache gets flushed every couple of minutes even I have set it up for day or longer. Cache is getting created on first call and after refreshing the page content is written from cache. But after couple of minutes cache is flushed and everything starts from beginning. Not sure if there ia any settings that I missed. The code didn't change and it was working for years. I updated to update 18 restarted the server but the issue is still there. What can caused the cache to be flushed? Thanks. Slaven

It looks similar to an issue CF-4204066 reported in ColdFusion 11 Update 18. The fix for both the issues will remain the same.

Please contact cfsup@adobe.com to get the hotfix for this issue.

-Nimit

ColdFusion Team

Views

634

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 18, 2019 0
Adobe Community Professional ,
Mar 18, 2019

Copy link to clipboard

Copied

Go to the page Server Settings > Caching in the ColdFusion Administrator and review your settings. Is the value for Maximum number of cached templates perhaps too low?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 18, 2019 1
Community Beginner ,
Mar 18, 2019

Copy link to clipboard

Copied

It is set to 2048. I am attaching screenshot of my settings2019-03-18_16-18-41.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 18, 2019 0
Adobe Community Professional ,
Mar 18, 2019

Copy link to clipboard

Copied

You cache settings look OK.

Could you share with the forum your cacheput and cacheget code, together with the code you use to refresh the page.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 18, 2019 0
Community Beginner ,
Mar 19, 2019

Copy link to clipboard

Copied

I use Mura CMS and that is how first I discovered that something is wrong with caching. I have enabled caching for Mura and pages were loading slow. I have other places that I use caching and the same problem. In order to test this issue I created a new folder in the root of my website with two files application.cfc:

component {

    this.name = "myApplication";

    this.applicationTimeout = CreateTimeSpan(10, 0, 0, 0); //10 days

    this.datasource = "my_datasource";

    this.sessionManagement = true;

    this.sessionTimeout = CreateTimeSpan(0, 0, 30, 0); //30 minutes

    function onApplicationStart() {

        return true;

    }

   function onRequest( string targetPage ) {

        include arguments.targetPage;

    }

}

and index.cfm:

<cfoutput>

  <cfset CacheValue = CacheGet("name") />

  CacheValue is NULL: #isNull(CacheValue)#<br>

  <cfif isNull(CacheValue)>

    <cfset CachePut("name", 'var to save', CreateTimeSpan(1,0,0,0) ) />

  </cfif>

  Dump CacheValue:<br>

  <cfdump var="#CacheValue#" />

  <cfscript>      

                Writedump(CacheGetProperties());

                Writedump(CacheGetAllIds());

</cfscript>

</cfoutput>

First time visiting the page https://www.nji-inm.ca/test I get the following response:

CacheValue is NULL: YES

Dump CacheValue:

If I refresh the page I get:

2019-03-19_8-51-02.png

But if I wait couple of minutes and refresh the page I am back to:

CacheValue is NULL: YES

Dump CacheValue:

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 19, 2019 0
Adobe Community Professional ,
Mar 19, 2019

Copy link to clipboard

Copied

Could this perhaps be happening because of where you place the output? To find out, test this:

<cfset CacheValue = cacheGet("name") />

CacheValue is NULL: <cfoutput>#isNull(cacheValue)#</cfoutput><br>

  <cfif isNull(cacheValue)>

    <cfset cachePut("name", 'var to save', createTimeSpan(1,0,0,0) ) />

  </cfif>

  Dump CacheValue:<br>

  <cfdump var="#cacheValue#" />

<cfscript>     

    writedump(cacheGetProperties());

    writedump(cacheGetAllIds());

</cfscript>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 19, 2019 0
Adobe Employee ,
Mar 19, 2019

Copy link to clipboard

Copied

It looks similar to an issue CF-4204066 reported in ColdFusion 11 Update 18. The fix for both the issues will remain the same.

Please contact cfsup@adobe.com to get the hotfix for this issue.

-Nimit

ColdFusion Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 19, 2019 1
Adobe Community Professional ,
Mar 19, 2019

Copy link to clipboard

Copied

Thanks for the update, Nimit.

I am assuming that CF-4204066 has fixed the cfquery/cachedwithin problem that WolfShade found.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 19, 2019 0
Adobe Employee ,
Mar 19, 2019

Copy link to clipboard

Copied

Yes, this issue has been fixed now.

Can you please try with this hotfix and confirm, if it resolves your issue?

-Nimit

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 19, 2019 2
Community Beginner ,
Mar 20, 2019

Copy link to clipboard

Copied

That doesn't make a difference. Thanks. Slaven

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 20, 2019 1
Community Beginner ,
Mar 20, 2019

Copy link to clipboard

Copied

I sent an email to cfsup@adobe.com and waiting for instructions. Slaven

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 20, 2019 0
lmave LATEST
Community Beginner ,
Mar 20, 2019

Copy link to clipboard

Copied

Fix hf1100-4204066.jar worked for me. Slaven

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 20, 2019 1
Adobe Community Professional ,
Mar 18, 2019

Copy link to clipboard

Copied

Slaven, are you really referring to a single cached thing, that you're watching? That would be odd if you are losing the cache that often. Are you 100% sure that the CF instance is not restarting?

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 18, 2019 0
Community Beginner ,
Mar 19, 2019

Copy link to clipboard

Copied

I checked the event log and the coldfusion service is running for 4 days since I installed update 18 and restarted the server. Slaven

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 19, 2019 0
Adobe Employee ,
Mar 19, 2019

Copy link to clipboard

Copied

Do you have sandbox security enabled on this CF instance?

-Nimit

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 19, 2019 0
Community Beginner ,
Mar 19, 2019

Copy link to clipboard

Copied

Sandbox security is not enabled.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 19, 2019 0