Ejemplo n.º 1
0
void CacheClientBlackBerry::initialize()
{
#if ENABLE(BLACKBERRY_DEBUG_MEMORY)
    bool isDisabled = true;
#else
    bool isDisabled = false;
#endif
    memoryCache()->setDisabled(isDisabled);
    if (!isDisabled) {
        // We have to set a non-zero interval to schedule cache pruning after a CachedImage becoming dead.
        memoryCache()->setDeadDecodedDataDeletionInterval(0.01);
        updateCacheCapacity();
    }
}
Ejemplo n.º 2
0
void CacheClientBlackBerry::initialize()
{
#if ENABLE(OLYMPIA_DEBUG_MEMORY)
    bool isDisabled = true;
#else
    const char* enableSegregatedMemoryCache = Olympia::Platform::environment("ENABLE_SEGREGATED_MEMORY_CACHE");
    // FIXME: segregated memory cache is not implemented yet; for now we will
    // turn off caching entirely if it is requested
    bool isDisabled = enableSegregatedMemoryCache && !strcmp(enableSegregatedMemoryCache, "1");
#endif
    cache()->setDisabled(isDisabled);
    if (!isDisabled) {
        cache()->setClient(this);
        // We have to set a non-zero interval to schedule cache pruning after a CachedImage becoming dead
        cache()->setDeadDecodedDataDeletionInterval(0.01);
        updateCacheCapacity();
    }
}
Ejemplo n.º 3
0
void CacheClientBlackBerry::didRemoveFromLiveResourcesSize(CachedResource*)
{
    // Check suggested cache capacity at this point
    updateCacheCapacity();
}