OptionalentryEstimated per-entry overhead; defaults to 256 bytes.
OptionalacceptReject before measuring or copying. Must not mutate this cache.
OptionaldetachOptionaldetachOptional key ownership copy after admission, before detach. Must return the same string value.
Estimated retained payload bytes, excluding the key and entry overhead.
Synchronous admission, size estimation and optional ownership-copy callbacks. Methods may be inherited. Callback references are captured at construction and invoked with the original policy as this; policy state is not copied or frozen.