Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Application_Model_DbTable_Base extends Zend_Db_Table_Abstract {
- public function __construct($config = array())
- {
- parent::__construct($config);
- if (Zend_Db_Table_Abstract::getDefaultMetadataCache() === null)
- {
- $frontendOptions = array('automatic_serialization' => true);
- $zendCacheDir = PUBLIC_PATH.'/cache/'; // directory for caching
- if (!file_exists($zendCacheDir))
- {
- mkdir($zendCacheDir, 0777);
- }
- $backendOptions = array('cache_dir' => $zendCacheDir);
- $cache = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);
- //$cache->clean(Zend_Cache::CLEANING_MODE_ALL);
- Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement