|
@@ -10,19 +10,13 @@ class Cache {
|
|
private static $drivers = array();
|
|
private static $drivers = array();
|
|
|
|
|
|
|
|
|
|
- * Get the cache driver instance.
|
|
+ * Get a cache driver instance. Cache drivers are singletons.
|
|
*
|
|
*
|
|
* @param string $driver
|
|
* @param string $driver
|
|
* @return Cache\Driver
|
|
* @return Cache\Driver
|
|
*/
|
|
*/
|
|
public static function driver($driver = null)
|
|
public static function driver($driver = null)
|
|
{
|
|
{
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
if ( ! array_key_exists($driver, static::$drivers))
|
|
if ( ! array_key_exists($driver, static::$drivers))
|
|
{
|
|
{
|
|
if (is_null($driver))
|
|
if (is_null($driver))
|
|
@@ -41,13 +35,9 @@ class Cache {
|
|
*/
|
|
*/
|
|
public static function __callStatic($method, $parameters)
|
|
public static function __callStatic($method, $parameters)
|
|
{
|
|
{
|
|
-
|
|
+
|
|
-
|
|
+
|
|
-
|
|
+
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
return call_user_func_array(array(static::driver(), $method), $parameters);
|
|
return call_user_func_array(array(static::driver(), $method), $parameters);
|
|
}
|
|
}
|
|
|
|
|