29 public function lock(
int $lockTime = 3600): bool
31 $currentTime = time();
32 if ($this->cache->read(1800, $this->name))
34 $value = $this->cache->get($this->name);
37 if (!empty($value) && $value > $currentTime)
42 $this->cache->setImmediate($this->name, $currentTime + $lockTime);