chesio / bc-cache

Simple full page cache plugin for WordPress inspired by Cachify
The Unlicense
9 stars 0 forks source link

Cache size inconsistency (again and again) #37

Closed chesio closed 5 years ago

chesio commented 5 years ago

Even after #35 has been fixed, there's still a minor source of cache size inconsistency. When new items are added to cache, cache size is incremented by size of created files only (ie. size of created directories is ignored).

Possible fixes:

  1. Calculate size of created directories and increment cache size accordingly. Obvious fix, but might be not that easy to implement (and might be not worth it).
  2. Do not attempt to measure cache size as equivalent to du -sb call, only count file sizes. This is perhaps better as double size reporting introduced as result of #35 in 1.6.1 could be removed. Also, any inconsistency between the two values would mean that there are either stray cache files or request variants filter is not correctly set (= user could be alerted).

Landing the issue in 1.7 milestone, so there's a time to think it through.