Cache with RailoColdboxProvider not expiring

Hi All,

For my application I am using cachebox, with the RailoColdboxProvider.
The only property I have set is the Railo Cache name:

product = {
  provider = "coldbox.system.cache.providers.RailoColdBoxProvider",
  properties = {
    cacheName="mmg_products"
  }
}

In my code, I lookup if a entry exists, and if so get that from the
cache. If not, create the item and place it in the cache:

<cfif variables.cacheManager.lookup(cacheRef)>
  <!--- Get the TreeLeave from the cache --->
  <cfset arrLoop = variables.cacheManager.get(cacheRef)>
<cfelse>
  <cfset arrLoop =
ProductService.getTreeNodeProducts(productid=rc.root[i].productid)>
  <cfset variables.cacheManager.set(cacheRef, arrLoop, 10)>
</cfif>

As you can see, I only want this Item to be cached for 10 minutes.

The problem is, the cache never seems to expire, the site show the
same cached item all day.

Is there an error in my code that I am not seeing? Or does the
RailoColboxProvider not let me use the expire option?

In Railo, I am using an external memcached extension to talk to a
memCached server.

Hope you can help!

Kind regards,

Erik-Jan Jaquet

Hi Erik

Well, the railo provider all it does is proxy the call to railo’s cachePut()

cachePut(arguments.objectKey,arguments.object,arguments.timeout,arguments.lastAccessTimeout, getConfiguration().cacheName);

So the timeouts are controlled by the cache you are using in Railo and not CacheBox. In this case, CacheBox acts as the cache API, but the cache functionality is configured by you via Railo or however it is configured. I would start there.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Hi Luis,

The Railo cache also has a default timeout of ten minutes, so the way
I see it, it should expire either way...

Also, I don't know if this has anything to do with my problem, but
when I look in the cachePanel, I get the following error:

Error Messages: this feature [keys] is not supported by memcached

Could that have someting to do with the problem, is memcached not
fully supported?

Erik-Jan

Have you seen it expire Erik if you do straight cacheput operations?

The lookup does this:

return cachekeyexists(arguments.objectKey, getConfiguration().cacheName );