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

caching logged in user #53

Closed
george-kar opened this issue Nov 8, 2017 · 1 comment
Closed

caching logged in user #53

george-kar opened this issue Nov 8, 2017 · 1 comment

Comments

@george-kar
Copy link

Would it be possible to use lada to cache the logged in user to avoid reading the database on every request? As lada doesn't support it out of the box, I am using this plugin https://github.com/hobbiot/cacheable-auth-user but I was wondering if I can use lada for this as well.

@spiritix
Copy link
Owner

Lada Cache does per default cache all models, including the user model. As long as you are including the trait in all your models I don't see a reason why the user model shouldn't not be cached. Maybe you could check if the Auth Facade does internally use Eloquent, otherwise it won't work at all.

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

2 participants