Changeset 534 for trunk/lib/Cache.inc.php
- Timestamp:
- Jul 27, 2015 7:56:08 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Cache.inc.php
r523 r534 26 26 * Provides an API for storing a limited amount of data 27 27 * intended to have a short lifetime in a user's session. 28 * 29 * Disable cache per-request by adding '_disable_cache=1' to a GET or POST parameter. 28 30 * 29 31 * @author Quinn Comendant <quinn@strangecode.com> … … 80 82 if (true !== $app->getParam('enable_session')) { 81 83 // Force disable the cache because there is no session to save to. 82 $app->logMsg('Cache disabled, enable_session is false.', LOG_DEBUG, __FILE__, __LINE__);84 $app->logMsg('Cache disabled, enable_session != true.', LOG_DEBUG, __FILE__, __LINE__); 83 85 $this->setParam(array('enabled' => false)); 84 86 } else if (!isset($_SESSION['_cache'][$this->_ns])) { … … 154 156 $app =& App::getInstance(); 155 157 156 if (true !== $this->getParam('enabled') ) {158 if (true !== $this->getParam('enabled') || getFormData('_disable_cache')) { 157 159 $app->logMsg(sprintf('Cache disabled, not saving data.', null), LOG_DEBUG, __FILE__, __LINE__); 158 160 return false; … … 207 209 $app =& App::getInstance(); 208 210 209 if (true !== $this->getParam('enabled') ) {211 if (true !== $this->getParam('enabled') || getFormData('_disable_cache')) { 210 212 $app->logMsg(sprintf('Cache disabled, not getting data.', null), LOG_DEBUG, __FILE__, __LINE__); 211 213 return false; … … 236 238 $app =& App::getInstance(); 237 239 238 if (true !== $this->getParam('enabled') ) {240 if (true !== $this->getParam('enabled') || getFormData('_disable_cache')) { 239 241 $app->logMsg(sprintf('Cache disabled on exist assertion.', null), LOG_DEBUG, __FILE__, __LINE__); 240 242 return false; … … 254 256 $app =& App::getInstance(); 255 257 256 if (true !== $this->getParam('enabled') ) {258 if (true !== $this->getParam('enabled') || getFormData('_disable_cache')) { 257 259 $app->logMsg(sprintf('Cache disabled, skipping delete of %s', $key), LOG_DEBUG, __FILE__, __LINE__); 258 260 return false;
Note: See TracChangeset
for help on using the changeset viewer.