This disables storing cache files if caching is disabled (expiry < 1).
Prevent storing cache objects if expire is non-positive (caching disa…
There could be some unexpected behaviour from this patch. Take this scenario:
$rest = new RestufService('http://google.com');
$rest->request(); //first run, returns fresh data
$rest2 = new RestfulService('http://google.com', 0);
$rest2->request(); //run before, but cache is 0 so returns fresh data
$rest3 = new RestufService('http://google.com');
$rest3->request(); //returns same result as $rest->request();
//ie: $rest->request() == $rest3->request();
So, I think storing the last valid response isn't that bad; however, if you never use the cache, then you'll obviously be ending up with lots of files on the file system that you don't want; perhaps the solution is to be able to turn caching off completely?
No activity in a long time. Closing.