http://www.playframework.org/documentation/2.0.2/JavaCache
Atm i can't find the Cache.remove method. I guess it's not implemented yet?
Then I would need to use a 3rd party library cache solution such as memcached for now.
// 2.0 final
Cache.set("item.key", null, 0)
// later
Cache.remove("item.key")
The Java cache directory is located in the following location: C:\Users\Anubhav\AppData\LocalLow\Sun\Java\Deployment\Cache.
Caffeine provides flexible construction to create a cache with a combination of the following optional features: automatic loading of entries into the cache, optionally asynchronously. size-based eviction when a maximum is exceeded based on frequency and recency.
Caffeine is a high performance, near optimal caching library and is an alternative to Ehcache for use with monoliths in JHipster. Similar to Ehcache, Caffeine cannot work as a distributed cache.
Although it's totally unclear it can be read as:
Since Play 2.0 final
to remove cache entry use:
Cache.set("item.key", null, 0);
(it will set cache for item.key
with null
value, which will expire after 0 seconds)
'later' means that somebody forgot to add this method and it will be added later ;)
Edit:
This issue is already addressed in Play's Lighthouse
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