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

Hi how the redis cache works? #1

Open
vinhvudev opened this issue Sep 30, 2019 · 2 comments
Open

Hi how the redis cache works? #1

vinhvudev opened this issue Sep 30, 2019 · 2 comments

Comments

@vinhvudev
Copy link

I went through your sample code and it's really good for me:

`
var cache = require('loopback-rediscache-models')(
{
app: app,
models: ['Customer']
});
Then in the models you want to use cache

var cache = require('loopback-rediscache-models')();
cache.findObj('Customer', 'id', 1).then(function (customer)
{
console.log(customer);
});
`

However I wonder how the cache work behind the scene?
Does it cache every loopback get request?
Does it invalidate cache every loopback post/patch request?
Do you try to update the cache instead of invalidate them for each post/patch request?

Please feel free to tell me If anything weird with my questions,

@glesage
Copy link
Contributor

glesage commented Dec 19, 2019

Oh hey! Sorry about the delay I don't have notifications setup for this repo. Is this still something you're looking to use or you've found something else?

@vinhvudev
Copy link
Author

Yes, I'm looking to how the cache system works ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants