Skip to content

Instantly share code, notes, and snippets.

@hmic
Created February 17, 2015 09:43
Show Gist options
  • Save hmic/208ddc077d78eadd0fc2 to your computer and use it in GitHub Desktop.
Save hmic/208ddc077d78eadd0fc2 to your computer and use it in GitHub Desktop.
Disabling crc32 based cache methods in cakephp-1.3
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