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

Row-based cache invalidation #68

Open
mostafa opened this issue Nov 23, 2023 · 0 comments
Open

Row-based cache invalidation #68

mostafa opened this issue Nov 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@mostafa
Copy link
Member

mostafa commented Nov 23, 2023

The current implementation of the caching stores tables as keys to invalidate the responses. This means that if any change is made to a table (or more), this will invalidate the entire cache for that table. This is inefficient, as read-heavy tables would require unnecessary caching and invalidation (aka. heavy-lifting) between the GatewayD, the cache plugin, the cache server (Redis) and the database (PostgreSQL). This means that for every update to even a single row in a table that has many cached responses in the cache server, the plugin will remove all the cached responses, effectively making subsequent queries to hit the database for a while until all those cache responses are cached.

@mostafa mostafa added the enhancement New feature or request label Nov 23, 2023
@mostafa mostafa self-assigned this Nov 23, 2023
@mostafa mostafa removed their assignment Dec 26, 2023
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
Status: 🆕 New
Development

No branches or pull requests

1 participant