candrews/HttpResponseCache

Cache size surpassing limit

helderm opened this issue · 1 comments

I installed the HTTP Cache and set to it a maximum size of 5Mb, however I can constantly reproduce the cache going over the limits. I saw once, for example, this same cache dir with 20Mb of size.
Things that might or not influence this behavior:

  • I use Jake Wharton's DiskLruCache to store images also, and as far as I know it is the same algorithm used by the HTTP cache to store data. Each one is configured to its own directory, so it shouldn't influence the other. However, my image cache always trims correctly at the limit size.
  • I use AdMob to monetize my app, and I noticed that it is by far the one that is cached most. Some light use of my app with AdMob surpassed the 5Mb limit easily.

There's a new release of DiskLruCache - perhaps that's fixed the problem? In any case, this bug would be in DiskLruCache, not in this library. I suggest that you find out if the problem persists in the latest version, and if so, report an issue there. Sorry I can't help!