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

0 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

22,966 views 26 12
Join discussion

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