How to change cache updating time in jira?

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 vote

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.

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

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!

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.

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

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)

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?

Retagging because it isn't On Demand version.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

767 views 2 19
Join discussion

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