public static Cache::getBins()
Gets all cache bin services.
Return value
\Drupal\Core\Cache\CacheBackendInterface[] An array of cache backend objects keyed by cache bins.
File
- core/lib/Drupal/Core/Cache/Cache.php, line 154
Class
- Cache
- Helper methods for cache.
Namespace
Drupal\Core\Cache
Code
public static function getBins() { $bins = array(); $container = \Drupal::getContainer(); foreach ($container->getParameter('cache_bins') as $service_id => $bin) { $bins[$bin] = $container->get($service_id); } return $bins; }
Please login to continue.