Files
smarty/tests/UnitTests/CacheResourceTests/PDOgzip/cacheresource.pdo_gziptest.php
T

22 lines
532 B
PHP
Raw Normal View History

<?php
2023-08-08 00:04:14 +02:00
use Smarty\Template\Cached;
require_once __DIR__ . '/../_shared/cacheresources/cacheresource.pdo_gzip.php';
class Smarty_CacheResource_Pdo_Gziptest extends Smarty_CacheResource_Pdo_Gzip
{
public $lockTime = 0;
2023-08-08 00:04:14 +02:00
public function hasLock(\Smarty\Smarty $smarty, Cached $cached)
{
if ($this->lockTime) {
$this->lockTime--;
if (!$this->lockTime) {
$this->releaseLock($smarty, $cached);
}
}
return parent::hasLock($smarty, $cached);
}
}