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

add cache driver option in abstract class #42

Closed
rssawhney opened this issue Dec 27, 2017 · 4 comments
Closed

add cache driver option in abstract class #42

rssawhney opened this issue Dec 27, 2017 · 4 comments
Assignees

Comments

@rssawhney
Copy link
Contributor

Issue

using different cache driver for model caching other than the app specific cache driver

Environment

Laravel Version: 5.5.25
Laravel Model Caching Package Version: 0.2.12
PHP Version: 7.1.11

Operating System & Version: Ubuntu 16.04

@mikebronner
Copy link
Owner

If you are configuring caching outside of Laravel, then this package probably isn't for your use case. This package specifically uses the cache driver configured in the app configuration, and is not meant to be used with external caching services.

If you do have the cache driver configured in the laravel config files, please reopen this issue and provide more details as to what problems you are having. Thanks for trying this package out, and good luck on your project! :)

@rssawhney
Copy link
Contributor Author

I am configuring cache inside laravel only, I am using 1 redis instance and 1 memcached. Where memcached one is defined in .env as CACHE_DRIVER.

This package is using the memcached driver for caching. I want to use the redis as caching driver that's why I was asking to add a custom driver option.

Something like this package https://github.com/dwightwatson/rememberable#cache-driver

@mikebronner
Copy link
Owner

HI @rssawhney thanks for following up with more details. I see now what you mean: you have two Laravel cache drivers defined, and want a way to specify which one to use. That makes sense! I will look into that. Thanks for the clarifying your use-case, that makes a lot of sense to add that ability to this package.

@mikebronner
Copy link
Owner

Just released version 0.2.13, please let me know if that fixes your issue. :)

Thanks!

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

No branches or pull requests

2 participants