Add small in-actor LRU cache for hot assets
AssetStoreServer runs on a single dedicated smarm actor thread, so a plain HashMap+VecDeque LRU in front of the SQLite lookup needs no locking. Capacity configurable via CCC_CACHE_CAPACITY (default 256). Bench (bench/RPS): +42-47% RPS under a cache-sized/hot-set workload, but a small net loss under adversarial uniform-random access with a cache smaller than the catalog. Real traffic is hot-set skewed, so net win in practice; capacity should be tuned to the expected hot set.
This commit is contained in:
@@ -3,3 +3,7 @@
|
||||
|
||||
/staging/*
|
||||
!/staging/.gitkeep
|
||||
|
||||
# bench harness generates these locally (see bench/RPS); not meant to be committed
|
||||
bench/urls*.txt
|
||||
bench/full_urls*.txt
|
||||
|
||||
Reference in New Issue
Block a user