Skip to content

Remove local buffering cache#24

Open
SadatAhmed-GBI wants to merge 5 commits intomainfrom
remove-local-buffering-cache
Open

Remove local buffering cache#24
SadatAhmed-GBI wants to merge 5 commits intomainfrom
remove-local-buffering-cache

Conversation

@SadatAhmed-GBI
Copy link
Contributor

No description provided.

Copy link

@mattwelke mattwelke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After reviewing this, it looks to me like this PR would remove the local caching. If so, this isn't the best way to change the library to solve our problem. There are three pieces of functionality the library appears to provide based on us examining it recently. It appears to:

  • Cache things in Redis (its primary function)
  • Cache things in local memory too (a secondary function, reducing stress on Redis)
  • Schedule work "lazily" (as opposed to "eagerly") to refresh the cache before the value in it would become stale (another secondary function, which appears to be called "buffering" based on the readme)

It's that 3rd functionality that needs to be removed because we've decided it isn't compatible with the kind of systems we want to create going forward. That style of caching is great for situations where we don't need to invalidate the cache, but now we need to invalidate the cache on the hour. So we want something that will cache things in Redis (because we use a distributed system) and also store them in local memory for a little bit of time (like 500ms) just to smooth out the load on Redis.

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.

2 participants