mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 22:01:36 +01:00
20 lines
503 B
PHP
20 lines
503 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
require_once SMARTY_DIR . '../demo/plugins/cacheresource.pdo_gzip.php';
|
||
|
|
|
||
|
|
class Smarty_CacheResource_Pdo_Gziptest extends Smarty_CacheResource_Pdo_Gzip
|
||
|
|
{
|
||
|
|
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);
|
||
|
|
}
|
||
|
|
}
|