Getting All Created Cache Drivers

Problem

You want to retrieve a list of created cached drivers.

Solution

Use the Cache::getDrivers() method.

This method returns an array. The array's key is the name of the driver. The value is the instance of the driver.

$created_drivers = Cache::getDrivers();

Discussion

If no drivers have been created, an empty array is returned.

comments powered by Disqus