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

Use a Cache Wrapper Struct instead of DataCache inside of ConnWrapper #11

Open
Heiss opened this issue Sep 21, 2023 · 0 comments
Open

Comments

@Heiss
Copy link
Contributor

Heiss commented Sep 21, 2023

So the user can define, what he wants to use. If it is needed, the CacheWrapper should Wrap the the conn and stores the returned data. The user can decide, if the data should be updated or comes from the cache. This ease the usage.

Find a way to store the returned data. Maybe something with Deref and DerefMut.

For a performance boost, the user can decide, when the cache should be updated. Example: The user locks the data and updates the cache at the beginning and can now operate on the cached data locally, knows he holds the lock.
At the first implementation, it should push all changes to cached data immediality to redis.
Later it should be possible to cache the changes and push them all at once (with redis transactions!). This comes with the downside, that if you lose the lock, because of sleep, you do not have any changes at all. So the user must decide, what is needed. This could be different CacheWrapper

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