Skip to content

fix: disable memory cache when Redis is available to prevent TTL staleness#259

Merged
ety001 merged 1 commit into
nextfrom
pr/05-disable-memory-cache-with-redis
Jun 1, 2026
Merged

fix: disable memory cache when Redis is available to prevent TTL staleness#259
ety001 merged 1 commit into
nextfrom
pr/05-disable-memory-cache-with-redis

Conversation

@ety001

@ety001 ety001 commented Jun 1, 2026

Copy link
Copy Markdown
Member

When Redis is configured, disable the in-process memory cache to prevent stale TTL entries that cause LIB to appear stuck. The memory cache TTL was not being refreshed on Redis updates, leading to cached responses diverging from the actual chain state.

…eness

Redis→memory promotion in CacheGroup.Get/MGet passed TTL=0, causing
entries like get_dynamic_global_properties (TTL=1s) to live indefinitely
in the memory layer and serve stale block data to wallets, which then
built transactions that expired before reaching steemd.

Now memory cache is only created as a fallback when Redis is unreachable.
The promotion TTL is also capped at 5s to prevent unbounded staleness
in the edge case where both caches coexist.
@ety001 ety001 merged commit 56ae2f9 into next Jun 1, 2026
2 checks passed
@ety001 ety001 deleted the pr/05-disable-memory-cache-with-redis branch June 1, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant