[bugfix] visibility after implicit approval not getting invalidated (#3370)

* replicate issue

* update go-structr to v0.8.10 with internal linked-list fix, small tweaks to caching of interaction requests

* remove debug function

---------

Co-authored-by: tobi <tobi.smethurst@protonmail.com>
This commit is contained in:
kim
2024-09-28 20:47:46 +00:00
committed by GitHub
parent 18b7e00fef
commit 095663f5cc
19 changed files with 239 additions and 136 deletions

View File

@ -575,8 +575,9 @@ func (c *Cache[T]) store_value(index *Index, key string, value T) {
item.data = value
if index != nil {
// Append item to index.
index.append(key, item)
// Append item to index a key
// was already generated for.
index.append(&c.lru, key, item)
}
// Get ptr to value data.
@ -607,8 +608,8 @@ func (c *Cache[T]) store_value(index *Index, key string, value T) {
continue
}
// Append item to index.
idx.append(key, item)
// Append item to this index.
idx.append(&c.lru, key, item)
}
// Add item to main lru list.
@ -645,8 +646,9 @@ func (c *Cache[T]) store_error(index *Index, key string, err error) {
// Set error val.
item.data = err
// Append item to index.
index.append(key, item)
// Append item to index a key
// was already generated for.
index.append(&c.lru, key, item)
// Add item to main lru list.
c.lru.push_front(&item.elem)