Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Set cache to only cache when required.

  • Loading branch information...
commit 5e422e4bc5ec1fd25aceb678c477a8a4cd6f62ab 1 parent 3c6a3f3
Matt Humphrey authored July 03, 2012

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. 7  classes/api.php
7  classes/api.php
@@ -46,8 +46,11 @@ public function get($path, $params = array(), $cache = null)
46 46
 		catch (\CacheNotFoundException $e)
47 47
 		{
48 48
 			$data = $this->request($path, $params, 'GET');
49  
-
50  
-			\Cache::set($hash, $data, $cache_value);
  49
+			
  50
+			if ($cache !== false)
  51
+			{
  52
+				\Cache::set($hash, $data, $cache_value);
  53
+			}
51 54
 		}
52 55
 
53 56
 		return $data;

0 notes on commit 5e422e4

Please sign in to comment.
Something went wrong with that request. Please try again.