/home/techb158/ileadtechnology.com/vendor/laravel/framework/src/Illuminate/Cache
NameSizeModeActions
Console/-0755rm
Events/-0755rm
ApcStore.php25860755editdlrm
ApcWrapper.php18980755editdlrm
ArrayLock.php20800644editdlrm
ArrayStore.php46610644editdlrm
CacheManager.php97820755editdlrm
CacheServiceProvider.php11160755editdlrm
composer.json12240755editdlrm
DatabaseLock.php34190644editdlrm
DatabaseStore.php98420755editdlrm
DynamoDbLock.php14860644editdlrm
DynamoDbStore.php146640644editdlrm
FileStore.php72910755editdlrm
LICENSE.md10750644editdlrm
Lock.php35450644editdlrm
LuaScripts.php4620644editdlrm
MemcachedConnector.php23820755editdlrm
MemcachedLock.php14530644editdlrm
MemcachedStore.php63260755editdlrm
NullStore.php17250755editdlrm
RateLimiter.php28800644editdlrm
RedisLock.php15810644editdlrm
RedisStore.php71000755editdlrm
RedisTaggedCache.php47540644editdlrm
Repository.php159810755editdlrm
RetrievesMultipleKeys.php9540644editdlrm
TaggableStore.php4210644editdlrm
TaggedCache.php25100644editdlrm
TagSet.php21500644editdlrm
Edit: /home/techb158/ileadtechnology.com/vendor/laravel/framework/src/Illuminate/Cache/DatabaseLock.php (3419B)
connection = $connection; $this->table = $table; $this->lottery = $lottery; } /** * Attempt to acquire the lock. * * @return bool */ public function acquire() { $acquired = false; try { $this->connection->table($this->table)->insert([ 'key' => $this->name, 'owner' => $this->owner, 'expiration' => $this->expiresAt(), ]); $acquired = true; } catch (QueryException $e) { $updated = $this->connection->table($this->table) ->where('key', $this->name) ->where(function ($query) { return $query->where('owner', $this->owner)->orWhere('expiration', '<=', time()); })->update([ 'owner' => $this->owner, 'expiration' => $this->expiresAt(), ]); $acquired = $updated >= 1; } if (random_int(1, $this->lottery[1]) <= $this->lottery[0]) { $this->connection->table($this->table)->where('expiration', '<=', time())->delete(); } return $acquired; } /** * Get the UNIX timestamp indicating when the lock should expire. * * @return int */ protected function expiresAt() { return $this->seconds > 0 ? time() + $this->seconds : Carbon::now()->addDays(1)->getTimestamp(); } /** * Release the lock. * * @return bool */ public function release() { if ($this->isOwnedByCurrentProcess()) { $this->connection->table($this->table) ->where('key', $this->name) ->where('owner', $this->owner) ->delete(); return true; } return false; } /** * Releases this lock in disregard of ownership. * * @return void */ public function forceRelease() { $this->connection->table($this->table) ->where('key', $this->name) ->delete(); } /** * Returns the owner value written into the driver for this lock. * * @return string */ protected function getCurrentOwner() { return optional($this->connection->table($this->table)->where('key', $this->name)->first())->owner; } }