-
Notifications
You must be signed in to change notification settings - Fork 694
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
Open Caching Mechanism #349
Comments
There is This is not exactly what you need, but for some dictionary-like entities (almost read-only) this might boost your app performance. |
@Tapac not exactly what I need, but yeah a start, I mean memcache or redis would be preferable (even opening up that class with some abstract methods would be good start so I can call those services myself). So yeah would only work for literally read-only data. Thanks though, wondering if I can expand on that example to create my own "layer" of sorts 👍 |
You can create pub-sub channel with Redis to keep all instances up-to-date. I.e. when one of the instances change data it publishes "invalidate" event and all other instances call |
I was thinking something like that too.
…On Mon, 30 Jul 2018 at 02:42 Andrey.Tarashevskiy ***@***.***> wrote:
You can create pub-sub channel with Redis to keep all instances
up-to-date. I.e. when one of the instances change data it publishes
"invalidate" event and all other instances call expireCache.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#349 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABHRsV606eQRUyhWvfgHhyoilarxpzJrks5uLtUagaJpZM4VcoYc>
.
|
This definitely need to stay in the docs. |
Have there been any updates on this? |
I would love to see something like this too, the PR #883 looks good |
This might be a little premature in the frameworks age, but are there any plans to open up the caching layer? I know this is something I can write on top of it, but the framework already provides mechanisms to invalidate the cache when a user does a write, something that is tricky to manage if your using Dao's directly.
Use case, Keeping, high read low write objects, E.g. a User object nearby in Memcache/Redis, this is an entity we almost always request for every request. (I think most applications would do something similar). That way we save having to hit the database for every request.
I'm not sure on the key/value interface, looking up and storing based on primary key would be more straight forward. I'm guessing caching queries that span multiple tables would not be advisable, if at all possible - esp as a change to a joined table in your query should invalidate the cached data. (maybe it already does that??)
Thoughts? I know Hibernate has something similar, not sure it can be used with Redis/Memcache though. http://doc.algotrader.ch/html/Hibernate_Sessions_and_Caching.html
The text was updated successfully, but these errors were encountered: