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.
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.