How do I know caching is working?
I'm building a Hakyll project - just like the demo one - and build times are abysimal, about half an hour every time. This is expected for the first build, as
stack downloads and compiles all the Haskell dependencies I am using, but they should be cached for the consecutive ones.
So I want to ensure my cache is configured correctly and working. In the first build, the
.stack directory was zipped and uploaded fine, in the second build it errored out with "500 internal server error" after retrying the upload twice.
I have not yet found out whether the cached zips are actually downloaded and extracted in the subsequent builds. By browsing around gitlab, I suspect that the output of a failed lookup lookup looks like this
Checking cache for pages/master... $ …
while a successfull cache lookup looks like this
Checking cache for pages/master/cache.zip... $ …
Is this accurate?
Regardless whether yes or no, please improve this message to explicitly state what the result of checking the cache was.
In my pipelines, the message always looks like the first one. If this means no cache entry was found, what could be the reason for this? Apparently in the first build it uploaded the zip fine. Are they deleted at the discretion of Gitlab (to save space)? If yes, a notification would be nice (possibly being part of the "checking cache" result). Btw, I hope that especially large zips are cached better, as they typically need more processor power to be generated. Storage would be cheaper I think…