mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-29 18:40:41 +00:00
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
This commit is contained in:
@@ -39,8 +39,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?
|
||||
|
||||
@@ -25,8 +25,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;
|
||||
|
||||
@@ -137,9 +135,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);
|
||||
@@ -277,9 +273,6 @@ bool const CacheObserver::UseNewCache()
|
||||
{
|
||||
uint32_t useNewCache = sUseNewCache;
|
||||
|
||||
if (sUseNewCacheTemp)
|
||||
useNewCache = 1;
|
||||
|
||||
switch (useNewCache) {
|
||||
case 0: // use the old cache backend
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user