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

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

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
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

212 views 3 7
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