Hi all,
For a big application we recently switched to using an external
memcached server to use with a Railo cluster of two webserver.
We are using the latests version of Coldbox, with Cachebox as our
cacheengine.
But we are seeing some strange behaviour in the cache. I have created
a sample page to demonstrate:
What I do, is the following:
<cfset var cacheRef = 'test_cache_3'>
<cfif variables.cacheManager.lookup(cacheRef)>
<cfset tmpVar = variables.cacheManager.get(cacheRef)>
<cfelse>
<cfset tmpVar = now()>
<cfset variables.cacheManager.set(cacheRef, tmpVar, 2, 2)>
</cfif>
<cfdump var="#variables.cacheManager.lookup(cacheRef)#">
<cfdump var="#tmpVar#">
When I run this code the first time, the item is placed in the cache.
As you can see, I have a timeout of two minutes. But the cache is
never cleared. When I use the native Railo tags for the cache, it
works as expected and the cache is cleared:
<cfset cachePut('hello','Hello
World!!',createTimespan(0,0,0,10),createTimespan(0,0,0,10),'mmg_products')>
<cfoutput>#cacheGet('hello', true, 'mmg_products')#</cfoutput>
That works like I would expect it, and clears the cache after 10
seconds.
Am I doing something wrong, or are there other people experiencing
this problem as well? I have also tried using a different caching
provider in Railo, (eh_cache lite) but with the same results.
Hope you can help!
Kind regards,
Erik-Jan Jaquet