From 4bda7943a7b0513f6c06ef2546e4d3f4534f97a9 Mon Sep 17 00:00:00 2001 From: Giovanni Derks Date: Wed, 4 Feb 2015 16:58:42 +0000 Subject: [PATCH] fixes #3850: RestfulService not using the cache --- api/RestfulService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/RestfulService.php b/api/RestfulService.php index 9d1116d42..589c2b68a 100644 --- a/api/RestfulService.php +++ b/api/RestfulService.php @@ -184,7 +184,7 @@ class RestfulService extends ViewableData implements Flushable { // Check for unexpired cached feed (unless flush is set) //assume any cache_expire that is 0 or less means that we dont want to // cache - if($this->cache_expire > 0 && self::$flush + if($this->cache_expire > 0 && !self::$flush && @file_exists($cache_path) && @filemtime($cache_path) + $this->cache_expire > time()) {