-
Notifications
You must be signed in to change notification settings - Fork 44
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
Sync cache between 2 processes/threads #296
Comments
Yes, one of the powerful aspects of using memory maps is that there is only one cache, operating system's disk cache, and so when it is updated, all processes see the update. |
So |
Sorry, I should have realized that you meant that object cache (which the
This |
What happens when you do |
I tried this approch Node Version: v18 |
with cache set to {validated:true}, db.get() will read from the latest that has been committed to the database, and reload the data from the database if the transaction id doesn't match object in the cache.
Do you have any steps to reproduce this? I just tested this, and it works properly, picking up the updates from the primary process/therad. |
Is it possible to sync caches between 2 processes? So that if one of them does
put
, other will fetch new version (not the one cached in other process's memory).The text was updated successfully, but these errors were encountered: