Are there any plans to add metrics that can help users decide whether the cache is too small or too large?
-
scenario 1: The cache size is too large.
- In this scenario, a metric of cache space usage (e.g. xx%) can let user know how many space can be cut off to save memory resource.
- NOTE: I did not find such metrics in other byte cache libraries.
-
scenario 2: The cache size is too small, causing most entries to be evicted one or two seconds after being added to the cache.
- In this scenario, user should increase the cache size. A metric of average entry life time seconds will let user know whether the cache is too small or not. If metric is too expensive, I think at least freecache could provide a OnEvicted hook (like OnRemoveWithMetadata in BigCache, but I did not find one in freecache), so that user can monitor the eviction event.
Are there any plans to add metrics that can help users decide whether the cache is too small or too large?
scenario 1: The cache size is too large.
scenario 2: The cache size is too small, causing most entries to be evicted one or two seconds after being added to the cache.