How to cancel the Jira Server’s caching function?

yanyi March 1, 2024

Hi, I am developing a project and need to cancel Jira Server’s caching function.

I’m using atlassian-jira-software-9.12.4, and noticed that when I modified the data in the “project” table used by Jira in the database, then refresh the web page about projects but the new data was not displayed. It seems that the project related information is cached.
Only when you clear the cache folder and restart the Jira server, or update the project information in the web page, will it be synchronized with the data in the database.

I googled for a long time, but I couldn’t find any information related to Jira cache. Does anyone know relevant information? Can I cancel this cache?

2 answers

1 accepted

0 votes
Answer accepted
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.
March 1, 2024

Welcome to the Atlassian Community!

Absolutely not.  You do not want to do this, because a) your data is being corrupted by your app and b) Jira will be too slow to be usable if you disable the caching.

Remove your app immediately, it is corrupting your data.  You need to rewrite it, removing all the code that corrupts your data by writing to the Jira database directly.

yanyi March 3, 2024

Hi @Nic Brough -Adaptavist-, thanks. Performance degradation is acceptable. I'm just going to demo something first.

I also noticed that when I modified the data in the “jiraissue” table in the database, then refresh the web page about Jira issues, the new data will displayed. It seems that it is different from projects and the issues related information is not cached.

Therefore, I would like to know if there is any place to modify this cache configuration so that it does not go to the cache like requesting Jira Issues related information?

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.
March 3, 2024

The caching is not the main problem here.  The problem is that  your database writes are corrupting your data.  

You need to stop looking at the database.  Turning off caching would a) render your Jira mostly useless and b) require you to rewrite quite a lot of Jira.

You need to remove all the code you have that is corrupting your data with database writes.

yanyi March 4, 2024

Ok, thanks. I will consider your suggestion and try to handle it at Jira level.

0 votes
Marc Koppelaar
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.
March 1, 2024

Hi @yanyi 

Welcome to the community.

My first question is, why are you adjusting information directly within the DB, any jira admin will tell you this.

This is a complete contradict way or working, why are you not making changes via the GUI?

And no cache is maintained until the restart or on triggering a full re-index (this will make the instance not usable during the process).

 

yanyi March 3, 2024

Hi @Marc Koppelaar , thank you.

We have a database proxy-level product for dynamic authorization. I need to demonstrate its functionality when combined with Jira. For example, User A does not have permission to view a certain data, and all he can see is "***". Actually, we are not modifying the data in the database. We just modify the SQL sent to the database. But if there is cache, Jira will not resend the SQL. This results in the functionality we wish to demonstrate not working.

Therefore, I would like to know if there is any place to modify this cache configuration so that it does not go to the cache like requesting Jira Issues related information?

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.
March 3, 2024

You need to stop using SQL.

Suggest an answer

Log in or Sign up to answer