Count what the cache holds in the default cache_max_bytes (closes #184)
check / check (push) Failing after 1s
check / check (push) Failing after 1s
The default cache_max_bytes was 75% of the space free at startup. The cache's own files are not free space, so a fuller cache got a smaller limit after a restart and eviction then deleted most of it. The default is now 75% of the sum of the free space and what the cache already holds by its own size accounting, at least 500 MiB. The cache works it out when it opens, after the database is open, so the computation and its tests moved from internal/config to internal/imgcache. The config only records whether cache_max_bytes was set; newCacheConfig in the handlers turns the disk cache off only for an explicit 0, and is tested for an omitted, a zero and a positive value. Model: opus-5-5
This commit was merged in pull request #188.
This commit is contained in:
+3
-2
@@ -128,8 +128,9 @@ access_control_allow_origin: "*"
|
||||
|
||||
# Maximum disk cache size in bytes. Explicit values are used exactly as
|
||||
# given; 0 disables the disk cache entirely (every request fetches and
|
||||
# processes uncached). When omitted, the default is 75% of the free
|
||||
# space on the filesystem containing <state_dir>/cache/ at startup,
|
||||
# processes uncached). When omitted, the default is 75% of the sum of
|
||||
# the free space on the filesystem containing <state_dir>/cache/ and
|
||||
# the bytes of images the cache already holds, worked out at startup,
|
||||
# with a minimum of 500 MiB.
|
||||
# cache_max_bytes: 10737418240
|
||||
|
||||
|
||||
Reference in New Issue
Block a user