Browse Source

Add support for closures in APC cache driver.

Taylor Otwell 13 years ago
parent
commit
ac38876e34
1 changed files with 1 additions and 1 deletions
  1. 1 1
      system/cache/driver/apc.php

+ 1 - 1
system/cache/driver/apc.php

@@ -38,7 +38,7 @@ class APC implements \System\Cache\Driver {
 
 		if ($cache === false)
 		{
-			return $default;
+			return is_callable($default) ? call_user_func($default) : $default;
 		}
 
 		return $this->items[$key] = $cache;