mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 967693 - Temporarily turn on HTTP cache v2, alternative pref to not lose early adopters, r=jduell
This commit is contained in:
parent
2af12fb550
commit
cdac679592
@ -1364,4 +1364,4 @@ pref("identity.fxaccounts.auth.uri", "https://api.accounts.firefox.com/v1");
|
||||
|
||||
|
||||
// Temporarily turn the new http cache v2 on for Desktop Firefox only
|
||||
pref("browser.cache.use_new_backend", 1);
|
||||
pref("browser.cache.use_new_backend_temp", true);
|
||||
|
@ -25,6 +25,9 @@ uint32_t CacheObserver::sMemoryLimit = kDefaultMemoryLimit;
|
||||
|
||||
static uint32_t const kDefaultUseNewCache = 0; // Don't use the new cache by default
|
||||
uint32_t CacheObserver::sUseNewCache = kDefaultUseNewCache;
|
||||
|
||||
static bool sUseNewCacheTemp = false; // Temp trigger to not lose early adopters
|
||||
|
||||
static int32_t const kAutoDeleteCacheVersion = -1; // Auto-delete off by default
|
||||
static int32_t sAutoDeleteCacheVersion = kAutoDeleteCacheVersion;
|
||||
|
||||
@ -102,6 +105,8 @@ CacheObserver::AttachToPreferences()
|
||||
|
||||
mozilla::Preferences::AddUintVarCache(
|
||||
&sUseNewCache, "browser.cache.use_new_backend", kDefaultUseNewCache);
|
||||
mozilla::Preferences::AddBoolVarCache(
|
||||
&sUseNewCacheTemp, "browser.cache.use_new_backend_temp", false);
|
||||
|
||||
mozilla::Preferences::AddBoolVarCache(
|
||||
&sUseDiskCache, "browser.cache.disk.enable", kDefaultUseDiskCache);
|
||||
@ -177,7 +182,12 @@ void CacheObserver::SchduleAutoDelete()
|
||||
// static
|
||||
bool const CacheObserver::UseNewCache()
|
||||
{
|
||||
switch (sUseNewCache) {
|
||||
uint32_t useNewCache = sUseNewCache;
|
||||
|
||||
if (sUseNewCacheTemp)
|
||||
useNewCache = 1;
|
||||
|
||||
switch (useNewCache) {
|
||||
case 0: // use the old cache backend
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user