Thanks for the quick response, Joel. >> It's true that ccache still performs some write operations in read-only mode: it updates statistics counters and updates mtime of files in the cache in case there was a cache hit >> Thus, read-only mode should be interpreted as "will not add new compilation results to the cache", not "will not perform any write operations to the cache".
That explains. I am ok with this behavior. >> If ccache can't perform those updates due to lack of permission, it just continues with life silently >> From your question, I assume that this behavior is not what you expected or wanted. Is it a problem in your case that ccache performs those write operations? Or have you found a case where ccache in read-only mode actually writes the result of a compilation into the cache? We have a continuous integration setup which updates the ccache and we want everyone else just to consume the ccache. I was a little worried that the result of compilation was being written back to the ccache and seems thats not the case. However, the time taken for the build when CCACHE_READONLY=1 flag is set is much more compared to the time taken when this flag is not set. The ccache hit rate is almost the same in both cases. I am using CCACHE_TEMPDIR option ( same filesystem location ) with CCACHE_READONLY flag. Could you let me know what could have gone wrong in this setup ? Thanks, Dinesh G On Fri, Feb 20, 2015 at 12:09 PM, Joel Rosdahl <j...@rosdahl.net> wrote: > Hi Dinesh, > > > I am using ccacge version 3.1.9 and trying a build with CCACHE_READONLY=1 > > and it seems not to be working. It tries to write back to the ccache. > [...] > > The problem mentioned in the mail to which you refer was that ccache tried > to create subdirectories in the cache and exited with a fatal error if it > couldn't create them, even when running in read-only mode. That was fixed > in 3.1.9. > > It's true that ccache still performs some write operations in read-only > mode: it updates statistics counters and updates mtime of files in the > cache in case there was a cache hit (this is to be able to tell which files > can be removed when the max cache size limit is reached). If ccache can't > perform those updates due to lack of permission, it just continues with > life silently. Thus, read-only mode should be interpreted as "will not add > new compilation results to the cache", not "will not perform any write > operations to the cache". > > From your question, I assume that this behavior is not what you expected > or wanted. Is it a problem in your case that ccache performs those write > operations? Or have you found a case where ccache in read-only mode > actually writes the result of a compilation into the cache? > > -- Joel > _______________________________________________ ccache mailing list ccache@lists.samba.org https://lists.samba.org/mailman/listinfo/ccache