Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to see if a fetch or pull hit the scm pack file cache?

Pierre Zurmely July 29, 2015

Hello,

I am using SCM cache in Stash, and not ref cache.

When I look at my access log files, I see when a clone hit or miss the scm cache.

But this cache contain pack files, that are also used during fetch and pull operations, if an update is truly required. Are those commands also using the scm cache? (I hope yes)
And do we have a way to see if the scm cache its hit for a fetch command?

 

An other question, relative to the same topic, is when I check the hits for shallow clone, it is always a miss. Do we have an issue here with the monitoring?

 

Regards,

Pierre

1 answer

0 votes
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 17, 2015

Hi Pierre,

Stash's scm-cache does not cache fetches; it only caches ref advertisements (when enabled) and clones. It does not cache fetches because the likelihood of cache hits is much lower for fetches; the pack that gets created for a fetch depends on the list of refs available on the server and the list of refs already present on the client. The chance of getting identical fetches in a small time window is significantly lower than the chance of getting identical clones.

when I check the hits for shallow clone, it is always a miss. Do we have an issue here with the monitoring

If you're only seeing misses for shallow clones, that implies that you're not getting identical shallow clones in the caching time-to-live window (default is 4 hours). You can experiment by performing two identical shallow clones shortly after each other. You should see cache:hit in the access logs for the second shallow clone.

Regards,

Michael

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events