Skip to content

Add a method to retrieve a snapshot of the TTLCache or VTTLCache if possible. #47

@hermeschen1116

Description

@hermeschen1116

I’m currently using VTTLCache in my program and accessing values through the Frozen view to ensure they are read-only in other parts of the code.

In my use case, I need to obtain a consistent snapshot of the Frozen view so that all values I read come from (at least approximately) the same point in time. Right now, this is tricky, because values may change while I’m copying or iterating, which can lead to RuntimeErrors.

Would it be possible to add an API that returns a static snapshot of the cache (or the Frozen view), so that iteration and copying can be done safely without concurrent modifications?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions