Index: Source/core/loader/cache/MemoryCache.h |
diff --git a/Source/core/loader/cache/MemoryCache.h b/Source/core/loader/cache/MemoryCache.h |
index 95b136ef8e7b838bc22174069a0e8e376ff88b6d..1a257a59bb3f57e2ae3ad782e0a3bb8af4e611f0 100644 |
--- a/Source/core/loader/cache/MemoryCache.h |
+++ b/Source/core/loader/cache/MemoryCache.h |
@@ -25,6 +25,7 @@ |
#ifndef Cache_h |
#define Cache_h |
+#include "core/platform/Timer.h" |
#include "wtf/HashMap.h" |
#include "wtf/Noncopyable.h" |
#include "wtf/Vector.h" |
@@ -119,6 +120,7 @@ public: |
// - maxDeadBytes: The maximum number of bytes that dead resources should consume when the cache is not under pressure. |
// - totalBytes: The maximum number of bytes that the cache should consume overall. |
void setCapacities(unsigned minDeadBytes, unsigned maxDeadBytes, unsigned totalBytes); |
+ void setDelayBeforeLiveDecodedPrune(unsigned seconds) { m_delayBeforeLiveDecodedPrune = seconds; } |
void evictResources(); |
@@ -184,6 +186,7 @@ private: |
unsigned m_minDeadCapacity; |
unsigned m_maxDeadCapacity; |
double m_deadDecodedDataDeletionInterval; |
+ unsigned m_delayBeforeLiveDecodedPrune; |
unsigned m_liveSize; // The number of bytes currently consumed by "live" resources in the cache. |
unsigned m_deadSize; // The number of bytes currently consumed by "dead" resources in the cache. |
@@ -193,8 +196,9 @@ private: |
// waiting to die when the clients referencing them go away. |
Vector<LRUList, 32> m_allResources; |
- // List just for live resources with decoded data. Access to this list is based off of painting the resource. |
- LRUList m_liveDecodedResources; |
+ // Lists just for live resources with decoded data. Access to this list is based off of painting the resource. |
+ // The lists are ordered by decode priority, with higher indices having higher priorities. |
+ LRUList m_liveDecodedResources[3]; |
// A URL-based map of all resources that are in the cache (including the freshest version of objects that are currently being |
// referenced by a Web page). |