Flushing cache vs increasing cache size

Sam July 19, 2020

Hello, thanks for reading my question!

I was wondering when would you want to flush a cache instead of increasing the cache's size, and how do the results differ for each process?

1 answer

1 accepted

1 vote
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.
July 19, 2020

A cache is a way of making thing work faster by way of making data available faster because you have it to hand.

Imagine a typical English speaker (as a first language).  We tend to have about 20,000 words to hand, and grasp instantly another 20,000 with a bit of thought.  (There's an essay about the smug gits who do latin/greek/crosswords etc getting higher numbers, but please don't ask).

Out language cache here is 20k, we can summon up and use those in real time.  If you increase that cache to 40k to include all the ones we currently have to think about, you slow down every search.  It's great that the range is doubled, but the cost is that the search gets exponentially slower.   An English speaker with a 20k cache is thousands of times more coherent than one with a 40k cache!

Humans don't have a function to flush their caches, but if they did, the symptom would be a human who suddenly became incapable of talking, for a few hours as they began to refill their cache.

Increasing the size of a cache generally degrades its usefulness, it's something to monitor very carefully, if you don't think the defaults are working right for you.

Sam July 20, 2020

Thank you for your explanation, @Nic Brough -Adaptavist- ! I feel like I understand the cache management system more. I'm also curious about when you would want to flush a cache for Confluence? Specifically, under which circumstances would you decide to flush a cache instead of increasing its size?

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.
July 20, 2020

That is a really really good question.

It has an utterly negative sounding answer - you seriously should never need to flush a cache, and on top of that, increasing the size of a cache is a shed-load worse!

A cache is a "pile of things you want to serve up quickly".  The larger a cache is, the slower it works, hence my instinct to keep a cache small.  But the fastest caches keep the stuff people ask for at the top of the list.

So, a bit of a weak analogy - Imagine the massive building next door to one end of my usual commute.  It's called "The British Library", and in theory, has a copy of every book in the world.  Most of the people who walk into it every day will ask to see something that is in within 0.001% of what the place holds.  So they cache that bit.

Now imagine the Library of Congress or The British Library were serving pages up in Confluence only...

TLDR: I'd increase a cache size if I had a lot of people asking stuff that isn't being server by the current one, and I'd flush a cache when it looks like people are no longer asking for the current content of it.

Like Sam likes this
Sam July 21, 2020

Thanks for the analogy; that's very helpful! The reason I asked is because I'm preparing for the ACP-200, and cache management seems to be an important topic for that exam. Thanks again, and have a nice day!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events