Hi,
Im trying to use the build in caching mechanism in confluence (CacheManager) to cache some processing done is servlets.
I used the following doc as reference:
https://developer.atlassian.com/confdev/development-resources/confluence-developer-faq/how-do-i-cache-data-in-a-plugin
The problem is that the cache doesn't seem to expire after 30 minutes (or any other time frame I try to set in the configuration).
Does anyone else encountered this issue? Is this doc up to date?
Im using confluence 5.7.4 I've also spotted this issue in 5.8.4
Cheers,
Community moderators have prevented the ability to post new answers.
Hi Aviram,
I had this issue too. At the end I set expireAfterAccess and expireAfterWrite. Clean cache plugins and everything is working as expected.
My cache settings
public CacheSettings getCacheSettings(){ CacheSettingsBuilder cacheSettings = new CacheSettingsBuilder(); cacheSettings.maxEntries(1000) .expireAfterAccess(0L, TimeUnit.MILLISECONDS) .expireAfterWrite(12, TimeUnit.HOURS) .flushable(); return cacheSettings.build(); }
How to clean cache
https://confluence.atlassian.com/display/CONFKB/How+to+clear+Confluence+plugins+cache
Related link
Regards
Nelson
That worked! Brilliant! Thanks! I hope Atlassian will update their docs soon, I can see a lot of people not even aware they have this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, got another question... does the cache key has anything to do with the cache aside for storage purposes? meaning, I don't have to use it in the "load" function right? can I just use global set fields of the class instead? Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
anyone?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.