Skip to content

JetBrains: Expire cached content requests after a set timeout

Warren Gifford requested to merge ps/jetbrains-cache-expiration into main

Created by: philipp-spiess

Closes #37373 (closed)

This PR adds a new class that implements a Map like interface. However for every item that is stored, it also stores the time on when this item was last accessed.

Whenever new items are added, we check if the cache contains items that are not accessed for a certain amount of time. If so, we remove them from the cache.

We use this in conjunction to our blob content cache to make sure we don't allocate items forever. For now, I've set a 30 inactivity expiration for the cache. This value is randomly picked and definitely up for debate.

Test plan

I validated the behavior manually by adding extensive logging and a reduced expiration time. You can see that items are removed from the cache in the console screenshot below:

Screenshot 2022-07-08 at 12 40 36

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading