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.
Optional
Estimated per-entry overhead; defaults to 256 bytes.
Reject before measuring or copying. Must not mutate this cache.
Optional ownership copy, called only after admission. Its size must match measure.
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.