forked from google/volley
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enforce disk size limit more strictly in DiskBasedCache.
-Previously, when new entries were written to the cache with put(), the size accounted for in those entries did not include cache overhead when actually storing them on disk. That overhead is now included. -We now prune excess entries after writing new entries to disk instead of before (so that we know the size-on-disk). This prevents the cache from exceeding the size limit due to one large entry (until the next put). The cache will now exceed the maximum size when writing an entry which pushes it over the limit; however, this excess will be cleared before put() returns rather than some indefinite time in the future. Fixes google#57
- Loading branch information
Showing
2 changed files
with
122 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters