Support the ongoing development of Laravel.io →
posted 10 years ago
Cache
Last updated 2 years ago.
0
/** @var \Illuminate\Cache\CacheManager $cache */
$cache = $app['cache'];
var_dump($cache->getDrivers());

$defaultCache = $cache->driver();
$arrayCache = $cache->driver('array');
$fileCache = $cache->driver('file');

var_dump($cache->getDrivers());

# or something like
# Cache:driver('...')

I didnt found a way to have two same type cache drivers to work simultaneously!

Last updated 2 years ago.
0

I've settled on using Cache::driver('file')-> for all my file caching needs. That's really amazing how simple, explicit, and easy to use it has been so far, Why is there nothing hinting this in the documentation?

Thank you so much!

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

IOM instanceofmichael Joined 11 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.