/
home
/
techb158
/
immovalet.com
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Cache
/
/home/techb158/immovalet.com/vendor/laravel/framework/src/Illuminate/Cache
mkdir
upload
Name
Size
Mode
Actions
Console/
-
0755
rm
Events/
-
0755
rm
RateLimiting/
-
0755
rm
ApcStore.php
2586
0644
edit
dl
rm
ApcWrapper.php
1898
0644
edit
dl
rm
ArrayLock.php
2080
0644
edit
dl
rm
ArrayStore.php
4661
0644
edit
dl
rm
CacheLock.php
1853
0644
edit
dl
rm
CacheManager.php
10650
0644
edit
dl
rm
CacheServiceProvider.php
1188
0644
edit
dl
rm
composer.json
1306
0644
edit
dl
rm
DatabaseLock.php
3640
0644
edit
dl
rm
DatabaseStore.php
10353
0644
edit
dl
rm
DynamoDbLock.php
1486
0644
edit
dl
rm
DynamoDbStore.php
14833
0644
edit
dl
rm
FileStore.php
8367
0644
edit
dl
rm
HasCacheLock.php
681
0644
edit
dl
rm
LICENSE.md
1075
0644
edit
dl
rm
Lock.php
3547
0644
edit
dl
rm
LuaScripts.php
462
0644
edit
dl
rm
MemcachedConnector.php
2382
0644
edit
dl
rm
MemcachedLock.php
1453
0644
edit
dl
rm
MemcachedStore.php
6326
0644
edit
dl
rm
NoLock.php
692
0644
edit
dl
rm
NullStore.php
2408
0644
edit
dl
rm
PhpRedisLock.php
3121
0644
edit
dl
rm
RateLimiter.php
3530
0644
edit
dl
rm
RedisLock.php
1794
0644
edit
dl
rm
RedisStore.php
8168
0644
edit
dl
rm
RedisTaggedCache.php
4777
0644
edit
dl
rm
Repository.php
16174
0644
edit
dl
rm
RetrievesMultipleKeys.php
1155
0644
edit
dl
rm
TaggableStore.php
421
0644
edit
dl
rm
TaggedCache.php
2532
0644
edit
dl
rm
TagSet.php
2150
0644
edit
dl
rm
Edit:
/home/techb158/immovalet.com/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php
(4777B)
<?php namespace Illuminate\Cache; class RedisTaggedCache extends TaggedCache { /** * Forever reference key. * * @var string */ const REFERENCE_KEY_FOREVER = 'forever_ref'; /** * Standard reference key. * * @var string */ const REFERENCE_KEY_STANDARD = 'standard_ref'; /** * Store an item in the cache. * * @param string $key * @param mixed $value * @param \DateTimeInterface|\DateInterval|int|null $ttl * @return bool */ public function put($key, $value, $ttl = null) { if ($ttl === null) { return $this->forever($key, $value); } $this->pushStandardKeys($this->tags->getNamespace(), $key); return parent::put($key, $value, $ttl); } /** * Increment the value of an item in the cache. * * @param string $key * @param mixed $value * @return int|bool */ public function increment($key, $value = 1) { $this->pushStandardKeys($this->tags->getNamespace(), $key); return parent::increment($key, $value); } /** * Decrement the value of an item in the cache. * * @param string $key * @param mixed $value * @return int|bool */ public function decrement($key, $value = 1) { $this->pushStandardKeys($this->tags->getNamespace(), $key); return parent::decrement($key, $value); } /** * Store an item in the cache indefinitely. * * @param string $key * @param mixed $value * @return bool */ public function forever($key, $value) { $this->pushForeverKeys($this->tags->getNamespace(), $key); return parent::forever($key, $value); } /** * Remove all items from the cache. * * @return bool */ public function flush() { $this->deleteForeverKeys(); $this->deleteStandardKeys(); return parent::flush(); } /** * Store standard key references into store. * * @param string $namespace * @param string $key * @return void */ protected function pushStandardKeys($namespace, $key) { $this->pushKeys($namespace, $key, self::REFERENCE_KEY_STANDARD); } /** * Store forever key references into store. * * @param string $namespace * @param string $key * @return void */ protected function pushForeverKeys($namespace, $key) { $this->pushKeys($namespace, $key, self::REFERENCE_KEY_FOREVER); } /** * Store a reference to the cache key against the reference key. * * @param string $namespace * @param string $key * @param string $reference * @return void */ protected function pushKeys($namespace, $key, $reference) { $fullKey = $this->store->getPrefix().sha1($namespace).':'.$key; foreach (explode('|', $namespace) as $segment) { $this->store->connection()->sadd($this->referenceKey($segment, $reference), $fullKey); } } /** * Delete all of the items that were stored forever. * * @return void */ protected function deleteForeverKeys() { $this->deleteKeysByReference(self::REFERENCE_KEY_FOREVER); } /** * Delete all standard items. * * @return void */ protected function deleteStandardKeys() { $this->deleteKeysByReference(self::REFERENCE_KEY_STANDARD); } /** * Find and delete all of the items that were stored against a reference. * * @param string $reference * @return void */ protected function deleteKeysByReference($reference) { foreach (explode('|', $this->tags->getNamespace()) as $segment) { $this->deleteValues($segment = $this->referenceKey($segment, $reference)); $this->store->connection()->del($segment); } } /** * Delete item keys that have been stored against a reference. * * @param string $referenceKey * @return void */ protected function deleteValues($referenceKey) { $values = array_unique($this->store->connection()->smembers($referenceKey)); if (count($values) > 0) { foreach (array_chunk($values, 1000) as $valuesChunk) { $this->store->connection()->del(...$valuesChunk); } } } /** * Get the reference key for the segment. * * @param string $segment * @param string $suffix * @return string */ protected function referenceKey($segment, $suffix) { return $this->store->getPrefix().$segment.':'.$suffix; } }
Save
cmd:
run