From 1079b0016d89b758e23f5e9996f84e0e4640009a Mon Sep 17 00:00:00 2001 From: Jared De Blander Date: Fri, 23 Aug 2013 16:13:30 -0400 Subject: [PATCH] Updated FeedCache.php to allow for the use of a custom local path. The ROOT constant is unique to CakePHP as far as I am aware. In any case this will allow you to set the local cache file to a path of your choosing. --- FeedCache.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/FeedCache.php b/FeedCache.php index 00d9250..578536a 100644 --- a/FeedCache.php +++ b/FeedCache.php @@ -13,8 +13,12 @@ class FeedCache { private $is_local; private $data = false; - public function __construct($local, $remote, $valid_for=3600) { - $this->local = ROOT.'cache/'.$local; + public function __construct($local, $remote, $valid_for=3600, $custom_local = false) { + if($custom_local){ + $this->local = $local; + }else{ + $this->local = ROOT.'cache/'.$local; + } $this->remote = $remote; $this->valid_for = $valid_for; $this->is_local = $this->check_local();