summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/eviction.h
Commit message (Collapse)AuthorAgeFilesLines
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Stop evictions while performing final cleanup.rvargas@google.com2010-07-201-1/+5
| | | | | | | | | | | | | The evictions code may post tasks for further processing and that is a problem at cache destruction, so add an explicit method to stop evictions. BUG=49547 TEST=none Review URL: http://codereview.chromium.org/2854053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52964 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Delete the disk cache if it is substantially biggerrvargas@google.com2010-02-191-0/+2
| | | | | | | | | | | | | | | | | | than the desired max size, and adjust eviction to avoid having long periods without it. There's a few users with caches that are too big, and it looks like the problem is that eviction could be stopped forever, while still adding new items to the cache. Now we only allow one minute (at a time) with eviction suspended. BUG=none TEST=none Review URL: http://codereview.chromium.org/647054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39407 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Don't evict entries if we are busy doing other stuff.rvargas@google.com2009-07-091-0/+3
| | | | | | | | | BUG=10727 TEST=none Review URL: http://codereview.chromium.org/155314 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20330 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Avoid recursion when trimming entries.rvargas@google.com2009-06-101-0/+1
| | | | | | | | | | | | | | TrimCacheV2() calls EvictEntry() to move a given entry to the "deleted" list. EvictEntry() deletes the actual data, and that may end up calling ModifyStorageSize() and TrimCacheV2() again. BUG=b/1909376 TEST=none Review URL: http://codereview.chromium.org/121002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18115 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Set up a new experiment on the dev channel.rvargas@google.com2009-04-221-0/+1
| | | | | | | | | Enable the new eviction algorithm for 10% of the current users on the dev channel. Review URL: http://codereview.chromium.org/79064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14229 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First pass to make it possible to havervargas@google.com2009-03-251-1/+2
| | | | | | | | | | | | multiple instances of BackendImpl. We need multiple objects to be able to support media files on the cache. After this change, histograms will be the only thing that get messed up by multiple disk caches. Review URL: http://codereview.chromium.org/49027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12520 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First implementation of TrimDeleted() and a fewrvargas@google.com2009-03-181-0/+1
| | | | | | | | | | other fixes related to the new eviction code. As before, almost everything is disabled by default. Review URL: http://codereview.chromium.org/48112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11995 0039d316-1c4b-4281-b951-d872f2087c98
* New disk cache eviction algorithm (partial implementation).rvargas@google.com2009-03-061-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | Disabled by a #def. When enabled, file format 2.1 is used, with a possible update from ver 2.0. If a version with this code disabled is run after the upgrade, it will just discard the file and go back to 2.0. We now put some of those extra list to use! Entries are separated into various lists depending on how often are used, and we keep track of previously evicted entries. If the new algorithm is not enabled, most of the code just goes through a different path (with the old code instead of the new one). One notable exception is OpenFollowingEntry, used to enumerate the entries on the cache; the code changed significantly to support the new version of the "cache iterator", but functionally should do the same as the current code. Review URL: http://codereview.chromium.org/27345 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11145 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: move eviction code to a separate file.rvargas@google.com2008-12-181-0/+57
There should be no change in behavior with this CL. Review URL: http://codereview.chromium.org/14183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7190 0039d316-1c4b-4281-b951-d872f2087c98