willvincent / feeds

A simple Laravel service provider for including the SimplePie library.
MIT License
309 stars 76 forks source link

Cache systems #48

Closed pierrocknroll closed 6 years ago

pierrocknroll commented 6 years ago

Hi, Currently you support caching in the filesystem but it could be great to use the cache used by Laravel (redis, memcache, db, etc.).

The problem is that simplepie->set_cache_location wait for a connection string like redis://127.0.0.1:6379 But I can't find how to get this connection string from the Laravel Cache façade.

Maybe you have an idea ?

Thanks

willvincent commented 6 years ago

I haven't really been active in the laravel community in well over a year. Not even using php much lately either -- I'd suggest asking on the laracasts forum, there's some really well informed folks there.

pierrocknroll commented 6 years ago

I have made something like this :

'cache.location' => 'redis://' . env('DB_REDIS_PASSWORD') . '@' . env('DB_REDIS_HOST') . ':' . env('DB_REDIS_PORT') . '/' . env('DB_REDIS_DATABASE'),

Will be enough for now ! Thanks