How to change cache updating time in jira?

mihan ayeshana May 2, 2012

I tried to change jira cache updating time 3600 second to 6 second using /atlassian-jira/WEB-INF/classes/crowd-ehcache.xml. But it still not working. It get 3600 seconds( 1 hour ) to update cache.How to change the cache updating time in jira?. Thanks

2 answers

0 votes
Ramiro Pointis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2012

Retagging because it isn't On Demand version.

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2012

Are you sure you are on onDemand? I think not because you could update the files.

Anyways, for the later versions of JIRA, cache time is configured on the UI and not on crowd-ehcache.cml. Can you look under Administration > Users > User Directories.

mihan ayeshana May 2, 2012

I cant find the extract location of it. can u help me to change the cache restarting time to 6 seconds. Tell me the way to do it

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2012

If you edit the directory you have configured, you will find something like 'Synchronisation Interval'. It is entered in minutes. So the least I guess is 1.

Are you you want such a small interval? That is going to affect the performance!

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 2, 2012

I really wouln't reduce it much if I were you. Is there a reason you want to reduce the user caching downwards? The defaults work for most people.

mihan ayeshana May 3, 2012

Yes reason is i want to get direct datbase changes in jira UI.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 3, 2012

Ah, then you're looking in the wrong place.

The database caches aren't necessarily re-read from the database - they can wander for ages. If Jira updates the database, then it automatically updates the caches too, but when I first tested SQL vs the database, I was able to see that the caches were days out of sync. That may have changed (I was looking at Jira 2.7 I think), but I still don't think it's a good idea

Also, you're looking in totally the wrong place. The cache setting you've found is JUST for user related stuff, it won't help you with any of the other data Jira caches.

Now, there is a call in the API that flushes the caches (I know Jamie's very helpful script-runner plugin can be told to call it), but even that has risks because you need Jira to be completely inactive between committing the SQL and the flush of the cache. It's ok if your SQL is buried in a script so that the gap is miniscule, and it's ok if you can be completely sure that there are no users actively updating the data.

Please stop looking for ways to mess with the database, you really shouldn't be trying this. Most of the experts here avoid it like the plague - follow their example. You really need to do this in code or you'll destroy your installation (and I'll mention the script-runner again, as that could be a massive help)

Ramiro Pointis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 3, 2012

Just to make sure, when you say Cache Update are you talking about for example the keys that Jira usses to insert a new value in the custom field table sequentially?

Suggest an answer

Log in or Sign up to answer