Confluence plugin cache will not reset after configured time exceeded


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:

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


2 answers

1 accepted

1 vote
Accepted answer

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();
		.expireAfterAccess(0L, TimeUnit.MILLISECONDS)
		.expireAfterWrite(12, TimeUnit.HOURS)

How to clean cache

Related link



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.

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!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 2 hours ago in Jira

How you can achieve compact and easy-to-maintain workflows in your JIRA( Server)

This approach requires you to have the JIRA administrative rights. The main aim of this article is to help you achieve an organized, easy-to-maintain workflows in your JIRA instance thereby, reducin...

36 views 0 0
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you