webengine/osswebengine/WebCore/loader/Cache.cpp
branchRCL_3
changeset 93 79859ed3eea9
parent 91 30342f40acbf
child 94 919f36ff910f
equal deleted inserted replaced
92:e1bea15f9a39 93:79859ed3eea9
    36 
    36 
    37 using namespace std;
    37 using namespace std;
    38 
    38 
    39 namespace WebCore {
    39 namespace WebCore {
    40 
    40 
    41 static const int cDefaultCacheCapacity = 4*1024*1024; // 4MB
    41 static const int cDefaultCacheCapacity = 8192 * 1024;
    42 
    42 
    43 static const double cMinDelayBeforeLiveDecodedPrune = 1; // Seconds.
    43 static const double cMinDelayBeforeLiveDecodedPrune = 1; // Seconds.
    44 static const float cTargetPrunePercentage = .95f; // Percentage of capacity toward which we prune, to avoid immediately pruning again.
    44 static const float cTargetPrunePercentage = .95f; // Percentage of capacity toward which we prune, to avoid immediately pruning again.
    45 
    45 
    46 #if PLATFORM(SYMBIAN)
    46 #if PLATFORM(SYMBIAN)
   104 CachedResource* Cache::requestResource(DocLoader* docLoader, CachedResource::Type type, const KURL& url, const String& charset)
   104 CachedResource* Cache::requestResource(DocLoader* docLoader, CachedResource::Type type, const KURL& url, const String& charset)
   105 #endif
   105 #endif
   106 {
   106 {
   107     // FIXME: Do we really need to special-case an empty URL?
   107     // FIXME: Do we really need to special-case an empty URL?
   108     // Would it be better to just go on with the cache code and let it fail later?
   108     // Would it be better to just go on with the cache code and let it fail later?
   109     if (url.isEmpty() || url.url().lower() == "about:blank")
   109     if (url.isEmpty())
   110         return 0;
   110         return 0;
   111     
   111     
   112     // Look up the resource in our map.
   112     // Look up the resource in our map.
   113     CachedResource* resource = m_resources.get(url.url());
   113     CachedResource* resource = m_resources.get(url.url());
   114 
   114