Improved comments in file cache driver.

This commit is contained in:
Taylor Otwell
2011-06-17 11:21:09 -07:00
parent 0ee4239613
commit 55e1055dd7

View File

@@ -29,17 +29,11 @@ class File implements \System\Cache\Driver {
*/ */
public function get($key, $default = null) public function get($key, $default = null)
{ {
// --------------------------------------------------
// If the item has already been loaded, return it.
// --------------------------------------------------
if (array_key_exists($key, $this->items)) if (array_key_exists($key, $this->items))
{ {
return $this->items[$key]; return $this->items[$key];
} }
// --------------------------------------------------
// Does the cache item even exist?
// --------------------------------------------------
if ( ! file_exists(APP_PATH.'cache/'.$key)) if ( ! file_exists(APP_PATH.'cache/'.$key))
{ {
return $default; return $default;