summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-03 04:40:24 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-03 04:40:24 +0200
commit4666691b63efc35fd31fbd1666d7f193fa1fde3e (patch)
tree85fc8f133f1ed8a212f86f022c47ec80d9bbed63
parent093b63034758fa8c85543afd6a93bcf1b6da231e (diff)
downloadUXP-4666691b63efc35fd31fbd1666d7f193fa1fde3e.tar
UXP-4666691b63efc35fd31fbd1666d7f193fa1fde3e.tar.gz
UXP-4666691b63efc35fd31fbd1666d7f193fa1fde3e.tar.lz
UXP-4666691b63efc35fd31fbd1666d7f193fa1fde3e.tar.xz
UXP-4666691b63efc35fd31fbd1666d7f193fa1fde3e.zip
Remove pref confusion around cache v2
- Renames browser.cache.use_new_backend to browser.cache.backend - Sets browser.cache.backend to 1 (use cache v2) - Removes browser.cache.use_new_backend_temp
-rw-r--r--modules/libpref/init/all.js3
-rw-r--r--netwerk/cache2/CacheObserver.cpp9
2 files changed, 2 insertions, 10 deletions
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index d1f047e36..d135f9309 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -42,8 +42,7 @@ pref("browser.cache.auto_delete_cache_version", 0);
// Preference for switching the cache backend, can be changed freely at runtime
// 0 - use the old (Darin's) cache
// 1 - use the new cache back-end (cache v2)
-pref("browser.cache.use_new_backend", 0);
-pref("browser.cache.use_new_backend_temp", true);
+pref("browser.cache.backend", 1);
pref("browser.cache.disk.enable", true);
// Is this the first-time smartsizing has been introduced?
diff --git a/netwerk/cache2/CacheObserver.cpp b/netwerk/cache2/CacheObserver.cpp
index 1eb76e8c5..6b6d89395 100644
--- a/netwerk/cache2/CacheObserver.cpp
+++ b/netwerk/cache2/CacheObserver.cpp
@@ -26,8 +26,6 @@ CacheObserver* CacheObserver::sSelf = nullptr;
static uint32_t const kDefaultUseNewCache = 1; // 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;
@@ -154,9 +152,7 @@ CacheObserver::AttachToPreferences()
"browser.cache.auto_delete_cache_version", kAutoDeleteCacheVersion);
mozilla::Preferences::AddUintVarCache(
- &sUseNewCache, "browser.cache.use_new_backend", kDefaultUseNewCache);
- mozilla::Preferences::AddBoolVarCache(
- &sUseNewCacheTemp, "browser.cache.use_new_backend_temp", false);
+ &sUseNewCache, "browser.cache.backend", kDefaultUseNewCache);
mozilla::Preferences::AddBoolVarCache(
&sUseDiskCache, "browser.cache.disk.enable", kDefaultUseDiskCache);
@@ -297,9 +293,6 @@ bool CacheObserver::UseNewCache()
{
uint32_t useNewCache = sUseNewCache;
- if (sUseNewCacheTemp)
- useNewCache = 1;
-
switch (useNewCache) {
case 0: // use the old cache backend
return false;