With the Grails ehcache plugin I'm trying to cache a response and occasionally refresh that response.
This is what I have in my Config.groovy,
grails.cache.config = {
cache {
name 'winners'
eternal false
timeToLiveSeconds 10
}
}
And I annotating the winners endpoint with @Cacheable('winners').
I am seeing the response get cached, but I am never seeing the cache expire. Anyone have any clue what might be going on here?
I had the same problem.
Adding ehcache.xml file into the config directory seemed to fix it.
See http://ehcache.org/documentation/integrations/grails for details.
Btw, I had to replace the attributes 'maxEntriesLocalHeap' with 'maxElementsInMemory'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With