Date: Tue, 3 Nov 2015 14:15:21 +0000 From: RW <rwmaillists@googlemail.com> To: ports@freebsd.org Subject: Re: ccache's cleanup algorithm Message-ID: <20151103141521.74c43a7d@gumby.homeunix.com> In-Reply-To: <201511031326.tA3DQkGW004763@sdf.org> References: <201511031326.tA3DQkGW004763@sdf.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 03 Nov 2015 07:26:46 -0600 Scott Bennett wrote: > In ccache's cleanup.c module, the comments say that files are > deleted from the cache on a LRU basis. However, the code refers to > mtime, not atime, so it appears that ccache is, in reality, using a > Least Recently *Modified* basis upon which to expire files from the > cache. Is that really what ccache does? Or did I miss something? > If it's really using LRM instead of LRU, can anyone explain why? That did use to be the case a long time ago, but I wrote a patch to update the mtimes after a cache hit. The mtime updates are still there, see from_cache() in ccache.c. Using the file atimes wouldn't work well because they can be accidentally updated by file searches, and a lot of filesytems are mounted with noatime anyway.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151103141521.74c43a7d>