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

Add distributed caching and explicit cache invalidation #19

Open
Cellivar opened this issue May 26, 2020 · 0 comments
Open

Add distributed caching and explicit cache invalidation #19

Cellivar opened this issue May 26, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@Cellivar
Copy link
Owner

Links ultimately end up as extremely read heavy operations, they're generated once and can be served many more times than they will be modified. They're an excellent target for heavy long-lived caching with distributed caches such as Redis.

Currently there is an in-memory cache that will temporarily cache entries for a set amount of time before purging. This mostly only helps with rapid repeat queries and only helps individual instances. If a cluster of instances are running as HA round-robin style the benefits of the in-memory cache go way down.

Add support for an external caching service that will automatically disable the in-memory cache in favor of the external distributed cache. For a first implementation go for Redis support since it seems to be both pretty easy as well as pretty popular.

The specific detail to implement here would be support for cache updates on deletes and re-creates. Because 'editing' a golink isn't a relevant concept at the moment we can simply forcibly delete the cache entry for a link when we delete it out of the database.

@Cellivar Cellivar added the enhancement New feature or request label May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant