X7ROOT File Manager
Current Path:
/home/prisjneg/public_html/vendor/laravel/framework/src/Illuminate/Cache
home
/
prisjneg
/
public_html
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Cache
/
📁
..
📄
ApcStore.php
(2.46 KB)
📄
ApcWrapper.php
(1.93 KB)
📄
ArrayLock.php
(2.1 KB)
📄
ArrayStore.php
(4.67 KB)
📄
CacheLock.php
(1.79 KB)
📄
CacheManager.php
(10.64 KB)
📄
CacheServiceProvider.php
(1.32 KB)
📁
Console
📄
DatabaseLock.php
(3.76 KB)
📄
DatabaseStore.php
(10.78 KB)
📄
DynamoDbLock.php
(1.54 KB)
📄
DynamoDbStore.php
(14.6 KB)
📁
Events
📄
FileLock.php
(271 B)
📄
FileStore.php
(9.67 KB)
📄
HasCacheLock.php
(681 B)
📄
LICENSE.md
(1.05 KB)
📄
Lock.php
(3.5 KB)
📄
LuaScripts.php
(462 B)
📄
MemcachedConnector.php
(2.33 KB)
📄
MemcachedLock.php
(1.42 KB)
📄
MemcachedStore.php
(6.18 KB)
📄
NoLock.php
(692 B)
📄
NullStore.php
(2.34 KB)
📄
PhpRedisLock.php
(829 B)
📄
RateLimiter.php
(5.29 KB)
📁
RateLimiting
📄
RedisLock.php
(1.73 KB)
📄
RedisStore.php
(10.14 KB)
📄
RedisTagSet.php
(3.13 KB)
📄
RedisTaggedCache.php
(3.03 KB)
📄
Repository.php
(16.69 KB)
📄
RetrievesMultipleKeys.php
(1.13 KB)
📄
TagSet.php
(2.46 KB)
📄
TaggableStore.php
(421 B)
📄
TaggedCache.php
(2.5 KB)
📄
composer.json
(1.49 KB)
Editing: ArrayLock.php
<?php namespace Illuminate\Cache; use Illuminate\Support\Carbon; class ArrayLock extends Lock { /** * The parent array cache store. * * @var \Illuminate\Cache\ArrayStore */ protected $store; /** * Create a new lock instance. * * @param \Illuminate\Cache\ArrayStore $store * @param string $name * @param int $seconds * @param string|null $owner * @return void */ public function __construct($store, $name, $seconds, $owner = null) { parent::__construct($name, $seconds, $owner); $this->store = $store; } /** * Attempt to acquire the lock. * * @return bool */ public function acquire() { $expiration = $this->store->locks[$this->name]['expiresAt'] ?? Carbon::now()->addSecond(); if ($this->exists() && $expiration->isFuture()) { return false; } $this->store->locks[$this->name] = [ 'owner' => $this->owner, 'expiresAt' => $this->seconds === 0 ? null : Carbon::now()->addSeconds($this->seconds), ]; return true; } /** * Determine if the current lock exists. * * @return bool */ protected function exists() { return isset($this->store->locks[$this->name]); } /** * Release the lock. * * @return bool */ public function release() { if (! $this->exists()) { return false; } if (! $this->isOwnedByCurrentProcess()) { return false; } $this->forceRelease(); return true; } /** * Returns the owner value written into the driver for this lock. * * @return string */ protected function getCurrentOwner() { if (! $this->exists()) { return null; } return $this->store->locks[$this->name]['owner']; } /** * Releases this lock in disregard of ownership. * * @return void */ public function forceRelease() { unset($this->store->locks[$this->name]); } }
Upload File
Create Folder