Class Smarty_CacheResource_Pdo

extends Smarty_CacheResource_Custom

PDO Cache Handler Allows you to store Smarty Cache files into your db. Example table : CREATE TABLE smarty_cache ( id char(40) NOT NULL COMMENT 'sha1 hash', name varchar(250) NOT NULL, cache_id varchar(250) DEFAULT NULL, compile_id varchar(250) DEFAULT NULL, modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, expire timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', content mediumblob NOT NULL, PRIMARY KEY (id), KEY name (name), KEY cache_id (cache_id), KEY compile_id (compile_id), KEY modified (modified), KEY expire (expire) ) ENGINE=InnoDB Example usage : $cnx = new PDO("mysql:host=localhost;dbname=mydb", "username", "password"); $smarty->setCachingType('pdo'); $smarty->loadPlugin('Smarty_CacheResource_Pdo'); $smarty->registerCacheResource('pdo', new Smarty_CacheResource_Pdo($cnx, 'smarty_cache'));

Methods
Methods inherited from Smarty_CacheResource_Custom
fetchTimestamp(), populate(), populateTimestamp(), process(), writeCachedContent(), readCachedContent(), clearAll(), clear(), hasLock(), acquireLock(), releaseLock()
Methods inherited from Smarty_CacheResource
getCachedContent(), locked(), load()
Properties
Properties inherited from Smarty_CacheResource
$sysplugins