can old cache files get cleaned out of the stash-home/cache/scm/ directory?

some of the directories under stash-home/cache/scm/ can grow very large. Can some of the old cache files be removed from this directory to save disk space? Is it only the last cache file that we have to keep?

1 answer

This widget could not be displayed.

Hi Vivian,

The stash-home/cache/scm directories contain the cache files for the scm-cache plugin, which caches clone operations. Each subdirectory contains files for a particular repository (the directory name is the repository ID). There can be multiple files in each repository directory; it all depends on what refs were included in the clone. The cache files for a repository are cleaned up:

  • whenever a ref is updated in the repository (a pull request is merged, someone pushes a branch or tag to the repository)
  • the cache file is more than 4 hours old (configurable)
  • on startup the cache/scm directory is cleared

There's also a built-in protection that prevents the SCM cache from completely filling the disk. The SCM cache will stop creating new cache files if the free space on the disk drops below a threshold (1Gb by default but configurable).

See https://confluence.atlassian.com/display/STASH/Scaling+Stash+for+Continuous+Integration+performancefor more details.

Hope this helps

Cheers,

Michael

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,327 views 8 11
Read article

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