mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-08 02:01:00 +02:00
21 lines
489 B
PHP
21 lines
489 B
PHP
![]() |
<?php
|
||
|
|
||
|
require_once SMARTY_DIR . '../demo/plugins/cacheresource.pdo.php';
|
||
|
|
||
|
class Smarty_CacheResource_Pdotest extends Smarty_CacheResource_Pdo
|
||
|
{
|
||
|
public $lockTime = 0;
|
||
|
|
||
|
|
||
|
public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
|
||
|
{
|
||
|
if ($this->lockTime) {
|
||
|
$this->lockTime--;
|
||
|
if (!$this->lockTime) {
|
||
|
$this->releaseLock($smarty, $cached);
|
||
|
}
|
||
|
}
|
||
|
return parent::hasLock($smarty, $cached);
|
||
|
}
|
||
|
}
|