403Webshell
Server IP : 167.99.224.18  /  Your IP : 216.73.216.136
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux wordpress-ubuntu-s-1vcpu-1gb-nyc1-01 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.0.25
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins-old/matomo/app/core/DeviceDetector/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins-old/matomo/app/core/DeviceDetector/DeviceDetectorCache.php
<?php

/**
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
namespace Piwik\DeviceDetector;

use Piwik\Cache as PiwikCache;
/**
 * Caching class used for DeviceDetector caching
 *
 * Combines Piwik\CacheFile with an additional caching in static property
 *
 * Static caching speeds up multiple detections in one request, which is the case when sending bulk requests
 */
class DeviceDetectorCache implements \DeviceDetector\Cache\CacheInterface
{
    protected static $staticCache = array();
    private $cache;
    private $ttl;
    public function __construct($ttl = 300)
    {
        $this->ttl = (int) $ttl;
        $this->cache = PiwikCache::getLazyCache();
    }
    /**
     * Function to fetch a cache entry
     *
     * @param string $id The cache entry ID
     * @return array|bool  False on error, or array the cache content
     */
    public function fetch($id)
    {
        if (empty($id)) {
            return \false;
        }
        if (array_key_exists($id, self::$staticCache)) {
            return self::$staticCache[$id];
        }
        if (!$this->cache->contains($id)) {
            return \false;
        }
        return $this->cache->fetch($id);
    }
    /**
     * A function to store content a cache entry.
     *
     * @param string $id The cache entry ID
     * @param array $content The cache content
     * @throws \Exception
     * @return bool  True if the entry was successfully stored
     */
    public function save($id, $content, $ttl = 0) : bool
    {
        if (empty($id)) {
            return \false;
        }
        self::$staticCache[$id] = $content;
        return (bool) $this->cache->save($id, $content, $this->ttl);
    }
    public function contains($id) : bool
    {
        return !empty(self::$staticCache[$id]) && $this->cache->contains($id);
    }
    public function delete($id) : bool
    {
        if (empty($id)) {
            return \false;
        }
        unset(self::$staticCache[$id]);
        return (bool) $this->cache->delete($id);
    }
    public function flushAll() : bool
    {
        return (bool) $this->cache->flushAll();
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit