Closed
Description
Description
I am trying to use bytes as my cost function, but the policy is silently casting the capacity from an int to a uint32. This effectively makes the max cache size 4GB, where values over that overflow and get a ~random size
To Reproduce
Set the capacity to math.MaxUint32 + 1 every entry will be rejected.
Expected behavior
Normal caching (or at least an error)
Environment
- OS: macos