Created
February 17, 2015 09:43
-
-
Save hmic/208ddc077d78eadd0fc2 to your computer and use it in GitHub Desktop.
Disabling crc32 based cache methods in cakephp-1.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppModel extends Model { | |
public function __construct($id = false, $table = null, $ds = null) { | |
if($ds) { | |
$ds->cacheMethods = false; | |
$ds->cacheSources = false; | |
} | |
parent::__construct($id, $table, $ds); | |
$this->setDataSource($this->useDbConfig); | |
$db =& ConnectionManager::getDataSource($this->useDbConfig); | |
$db->cacheMethods = false; | |
$this->cacheSources = false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment