diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-19 00:53:02 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-19 00:53:02 +0000 |
commit | d997862f6c876e5fe85304a6f0ab82dbd1acf576 (patch) | |
tree | 20e8b3649a5d0b6d502f586992262b0d50fccbb0 /net/disk_cache/eviction.h | |
parent | 1f43948cc3e6d925b268d77fdac3c873dd7bb23f (diff) | |
download | chromium_src-d997862f6c876e5fe85304a6f0ab82dbd1acf576.zip chromium_src-d997862f6c876e5fe85304a6f0ab82dbd1acf576.tar.gz chromium_src-d997862f6c876e5fe85304a6f0ab82dbd1acf576.tar.bz2 |
Disk cache: Delete the disk cache if it is substantially bigger
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
Diffstat (limited to 'net/disk_cache/eviction.h')
-rw-r--r-- | net/disk_cache/eviction.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/disk_cache/eviction.h b/net/disk_cache/eviction.h index e3c0a72..c86e33a 100644 --- a/net/disk_cache/eviction.h +++ b/net/disk_cache/eviction.h @@ -42,6 +42,7 @@ class Eviction { private: void PostDelayedTrim(); void DelayedTrim(); + bool ShouldTrim(); void ReportTrimTimes(EntryImpl* entry); Rankings::List GetListForEntry(EntryImpl* entry); bool EvictEntry(CacheRankingsBlock* node, bool empty); @@ -67,6 +68,7 @@ class Eviction { Rankings* rankings_; IndexHeader* header_; int max_size_; + int trim_delays_; bool new_eviction_; bool first_trim_; bool trimming_; |