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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.