mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-05 23:01:37 +01:00
19 lines
433 B
PHP
19 lines
433 B
PHP
<?php
|
|
|
|
|
|
class Smarty_CacheResource_Filetest extends \Smarty\Cacheresource\File
|
|
{
|
|
public $lockTime = 0;
|
|
|
|
public function hasLock(\Smarty\Smarty $smarty, \Smarty_Template_Cached $cached)
|
|
{
|
|
if ($this->lockTime) {
|
|
$this->lockTime--;
|
|
if (!$this->lockTime) {
|
|
$this->releaseLock($smarty, $cached);
|
|
}
|
|
}
|
|
return parent::hasLock($smarty, $cached);
|
|
}
|
|
}
|