Keep the content type a store put in memory over one read from disk (closes #70)
check / check (push) Successful in 3m31s
check / check (push) Successful in 3m31s
GetVariant now adds the content type it read from a .meta file only when memory holds none for the variant, so a type StoreVariant added meanwhile is not replaced. A read that found no .meta file yet still gets application/octet-stream for that one request, as before this change, but no longer leaves it in memory for later hits. Model: opus-5-5
This commit is contained in:
@@ -33,7 +33,8 @@ exhaustion
|
||||
- 2026-09-29 variant content types kept in memory (closes #70):
|
||||
`Cache.metaCache` holds the content types of up to 10,000 variants in an LRU
|
||||
(`github.com/hashicorp/golang-lru/v2`), filled by `StoreVariant` and by
|
||||
`GetVariant` after it reads a `.meta` file; for a variant it holds, `Lookup`
|
||||
`GetVariant` after it reads a `.meta` file, where a type `StoreVariant` added
|
||||
meanwhile is kept over the one read; for a variant it holds, `Lookup`
|
||||
skips the check of the disk and `GetVariant` skips the `.meta` read, still
|
||||
opening the variant file and taking the size from it; eviction removes the
|
||||
entry before deleting the files, and `GetVariant` removes it when the file
|
||||
|
||||
Reference in New Issue
Block a user