The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Vivian Zhang
May 7, 2014

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 12, 2014

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

TAGS
AUG Leaders

Atlassian Community Events