Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote cache invalidation #9

Open
gedw99 opened this issue Jun 18, 2023 · 0 comments
Open

Remote cache invalidation #9

gedw99 opened this issue Jun 18, 2023 · 0 comments

Comments

@gedw99
Copy link

gedw99 commented Jun 18, 2023

Saw the cc’ing pancake and with cache is would be cool if there was a way to invalidate a cache.

a simple example use case is html file that is produced from sone upstream process like a generator.
The generator produces a new version of html file and so wants to tell the cache that despite a TTL of 10 minutes there is a new version.

The other way to think about caching is usingn hashes which maybe works in combination with my use case above. If a request for the html occurs then a cache expired could fire by comparing the hash of the html in the cache with the upstream one.

It maybe that we can combine the two thing above and have a sort of cache registry that is push based. So when upstream change the html file, it fires an event to the registry. The csche system consumes events off the registry and then gets the new html.
When a user requests data from the cache it is already updated. So we now have a caching system that is pre cache missing / invalidating.

not sure how this affects the “thundering herd “ use case when you start a new server with a cold cache. Obviously it will cache miss and go get the original html.

a tually the nice thing about the remote hash push is tha we can have many caches and then will all self update before needed.

many way I have not studied the xcsche code fully but let me know if this is useful.

the bandwidth will still be the same because the events are pushed over a channel or SSE , and the csche then pulls them just like before

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

No branches or pull requests

1 participant