Permalink
Browse files

Small update to v1.2.

  • Loading branch information...
1 parent 4df226e commit 2c4bac53e78b440b62305a3bdcdedff0088e89d5 @gilbitron committed Nov 6, 2010
Showing with 3 additions and 4 deletions.
  1. +3 −4 simpleCache.php
View
@@ -1,5 +1,5 @@
<?php
-/* SimpleCache v1.1
+/* SimpleCache v1.2
* May 2010
* Gilbert Pellegrom
* http://gilbertpellegrom.co.uk
@@ -34,10 +34,9 @@ function set_cache($label, $data)
function get_cache($label)
{
- $filename = $this->cache_path . $this->safe_filename($label) .'.cache';
-
- if(file_exists($filename) && (filemtime($filename) + $this->cache_time >= time()))
+ if($this->is_cached($label))
{
+ $filename = $this->cache_path . $this->safe_filename($label) .'.cache';
return file_get_contents($filename);
}

0 comments on commit 2c4bac5

Please sign in to comment.