Skip to content

In S3 and SIEVE, don't evict when updating an entry #201

@masklinn

Description

@masklinn

The caching protocol is such that to update a partial result with more domains it has to be re-set.

While the LRU implementation evicts after insertion, the S3 and SIEVE insertions first make room for an entry, then insert the new entry.

For partial entry this is unnecessary, and can create odd states where there are multiple entries in the fifo with different data but the same key. Instead, since the cache entries are mutable (unlike the results) the value should simply be updated in place. The hit has already been recorded since the __getitem__ which retrieved the partial entry.

Beware: in S3, do not confuse a cache hit with a ghost cache hit, the second should not suppress the insertion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions