⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.177
Server IP:
50.6.168.112
Server:
Linux server-617809.webnetzimbabwe.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.4.10
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
ctaacademy
/
www
/
vendor
/
aws
/
aws-sdk-php
/
src
/
View File Name :
LruArrayCache.php
maxItems = $maxItems; } public function get($key) { if (!isset($this->items[$key])) { return null; } $entry = $this->items[$key]; // Ensure the item is not expired. if (!$entry[1] || time() < $entry[1]) { // LRU: remove the item and push it to the end of the array. unset($this->items[$key]); $this->items[$key] = $entry; return $entry[0]; } unset($this->items[$key]); return null; } public function set($key, $value, $ttl = 0) { // Only call time() if the TTL is not 0/false/null $ttl = $ttl ? time() + $ttl : 0; $this->items[$key] = [$value, $ttl]; // Determine if there are more items in the cache than allowed. $diff = count($this->items) - $this->maxItems; // Clear out least recently used items. if ($diff > 0) { // Reset to the beginning of the array and begin unsetting. reset($this->items); for ($i = 0; $i < $diff; $i++) { unset($this->items[key($this->items)]); next($this->items); } } } public function remove($key) { unset($this->items[$key]); } /** * @return int */ #[\ReturnTypeWillChange] public function count() { return count($this->items); } }