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: RedisTagSet.php
<?php namespace Illuminate\Cache; use Illuminate\Support\Carbon; use Illuminate\Support\LazyCollection; class RedisTagSet extends TagSet { /** * Add a reference entry to the tag set's underlying sorted set. * * @param string $key * @param int|null $ttl * @param string $updateWhen * @return void */ public function addEntry(string $key, ?int $ttl = null, $updateWhen = null) { $ttl = is_null($ttl) ? -1 : Carbon::now()->addSeconds($ttl)->getTimestamp(); foreach ($this->tagIds() as $tagKey) { if ($updateWhen) { $this->store->connection()->zadd($this->store->getPrefix().$tagKey, $updateWhen, $ttl, $key); } else { $this->store->connection()->zadd($this->store->getPrefix().$tagKey, $ttl, $key); } } } /** * Get all of the cache entry keys for the tag set. * * @return \Illuminate\Support\LazyCollection */ public function entries() { return LazyCollection::make(function () { foreach ($this->tagIds() as $tagKey) { $cursor = $defaultCursorValue = '0'; do { [$cursor, $entries] = $this->store->connection()->zscan( $this->store->getPrefix().$tagKey, $cursor, ['match' => '*', 'count' => 1000] ); if (! is_array($entries)) { break; } $entries = array_unique(array_keys($entries)); if (count($entries) === 0) { continue; } foreach ($entries as $entry) { yield $entry; } } while (((string) $cursor) !== $defaultCursorValue); } }); } /** * Remove the stale entries from the tag set. * * @return void */ public function flushStaleEntries() { $this->store->connection()->pipeline(function ($pipe) { foreach ($this->tagIds() as $tagKey) { $pipe->zremrangebyscore($this->store->getPrefix().$tagKey, 0, Carbon::now()->getTimestamp()); } }); } /** * Flush the tag from the cache. * * @param string $name */ public function flushTag($name) { return $this->resetTag($name); } /** * Reset the tag and return the new tag identifier. * * @param string $name * @return string */ public function resetTag($name) { $this->store->forget($this->tagKey($name)); return $this->tagId($name); } /** * Get the unique tag identifier for a given tag. * * @param string $name * @return string */ public function tagId($name) { return "tag:{$name}:entries"; } /** * Get the tag identifier key for a given tag. * * @param string $name * @return string */ public function tagKey($name) { return "tag:{$name}:entries"; } }
Upload File
Create Folder