fix (caching): fix docker overlayfs issue

for some reasons unlink is not enough using docker which never release
the unlinked files back to the os making df -h reporting different
things than du -hsx /
This commit is contained in:
MickaelK
2026-09-08 01:13:59 +10:00
parent 1707a83a11
commit 99513d9358
+1
View File
@@ -33,6 +33,7 @@ func init() {
fileCache = NewAppCache()
fileCache.OnEvict(func(key string, value interface{}) {
if tmpPath, _, ok := strings.Cut(value.(string), "::"); ok {
os.Truncate(tmpPath, 0)
os.RemoveAll(tmpPath)
}
})