I've just turned on eventhandler caching and I'm curious if there is an API
to programmatically invalidate an entry? My handler looks like:
<event-handler name="slug" cache="true" cacheTimeout="300"
cacheKeyValues="id">
I'd like to be able to kick out /index.cfm/event/slug/id/12345 whenever
slug 12345 is updated. Possible? I do see that the SimpleTimedCache.cfc
has a purge() method that takes a key but it feels brittle to access it
directly and compose the cache key.
Secondarily, I'm thinking about externalizing this cache to use redis or
memcached so it can survive between model-glue restarts. Looks like I just
need the same interface and then override it in my modelglue.xml with
something like:
<bean id="modelGlue.cacheAdapter" class="my.memcached.CacheAdapter">
<constructor-arg
name="sweepInterval"><value>10</value></constructor-arg>
</bean>
Key to my use case is being able to bust the cache when the underlying data
changes. It's infrequent, but needs to update quickly when it does so
general timed expiration is not the best fit for this scenario.
Brian
--
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
---
You received this message because you are subscribed to the Google Groups
"model-glue" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.