parent
b592795c0b
commit
bb287a11c9
|
|
@ -4945,8 +4945,9 @@ bool LLAppViewer::initCache()
|
|||
const std::string cache_dir_name = gSavedSettings.getString("DiskCacheDirName");
|
||||
|
||||
const U32 MB = 1024 * 1024;
|
||||
constexpr U32 GB = 1024 * MB; // <FS:Beq/> Readability constant
|
||||
const uintmax_t MIN_CACHE_SIZE = 256 * MB;
|
||||
const uintmax_t MAX_CACHE_SIZE = 9984ll * MB;
|
||||
const uintmax_t MAX_CACHE_SIZE = 100ULL * GB; // <FS:Beq/> raise the cap to 100GB, UI will limit to a more sensible level of 20GB.
|
||||
const uintmax_t setting_cache_total_size = uintmax_t(gSavedSettings.getU32("CacheSize")) * MB;
|
||||
const uintmax_t cache_total_size = llclamp(setting_cache_total_size, MIN_CACHE_SIZE, MAX_CACHE_SIZE);
|
||||
// <FS:Ansariel> Better cache size control
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@
|
|||
increment="64"
|
||||
initial_value="1024"
|
||||
layout="topleft"
|
||||
max_val="9984"
|
||||
max_val="20000"
|
||||
min_val="256"
|
||||
top_pad="10"
|
||||
name="cache_size"
|
||||
|
|
@ -446,7 +446,7 @@
|
|||
increment="64"
|
||||
initial_value="1024"
|
||||
layout="topleft"
|
||||
max_val="9984"
|
||||
max_val="20000"
|
||||
min_val="256"
|
||||
top_pad="10"
|
||||
name="asset_cache_size"
|
||||
|
|
|
|||
Loading…
Reference in New Issue