Skip to content

Make cache TTL for revision-keyed entries equal to quantization window instead of 2x quantization window #3299

Description

@tstirrat15

Or at least revisit where Otter starts counting. Currently we're using ExpiryAccessing, which means the timer starts from the last time the entry was accessed; 2x the quantization window means that the max life of an entry is 4x the quantization window, assuming that the access is smeared and the entry was created at the beginning of the quantization window and read at the end of the smeared quantization window.

We can probably tighten that up, either by changing the policy to be based on creation/write rather than access, or by making it so that the TTL is just the quantization window. This should reduce overall SpiceDB memory usage somewhat.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/perfAffects performance or scalability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions