We want to automatically update a specific page in wiki by directly updating the record in BODYCONTENT table in database. Unfortunately the users don't see the changes after changing the database record.
I guess this has to do with the object cache in Confluence, that doesn't ask the database for changes if the object is always in cache. Is there any way to force the cache to refresh (not from admin area, but by calling something from our script that does the changes in BODYCONTENT)?
Or can I call the page with some parameter that loads the content from database instead of cache?
Short answer is "don't do it". You should not be even thinking about poking data into Confluence while it's running.
"Refreshing the cache" would be a nightmare that involves rewriting core code. You could do it, but you'll need to retest all sorts of stuff, persist it through upgrades and frankly, there's far better ways to approach this. The first thing to think of is abstracting the call for data from the content of your page.
I would write a macro that provides the current content from a database table outside Confluence (it can be inside the Confluence schema of course, but the point is to keep it separate and a separate table is the easiest way to do it). Before diving into that though, I'd look at https://studio.plugins.atlassian.com/wiki/display/SQL/Confluence+SQL+Plugin as that could solve the problem or at least give you a start on how to code something if it's not quite right.
I do direct inject into the database at the moment, and it is realy not such a big deal - of cause there is a risk, but that is primarily when upgrading Confluence, my current injection of WIKI markup is not V4 compliant.
I stumbled across this post searching for a way to refresh the body cache, calling the URL
will do it (similar to use the gui at /admin/cachestatistics.action?showDistributions=false - flusing the "Content Bodies")
I just nedd to find the login parameters, somethin simelar to JIRA's os_user etc...
The CLI is a great tool, but I dont want page history as several pages are updated each day, and I use the pageId for getting data in.
See my scripts at http://www.mos-eisley.dk/display/it/Confluence
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Hi Community, Jessica here from the Confluence Product Marketing team! July’s community challenge is all about sharing pictures — and as an extension of our first post on what ...
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!
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