%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom645759/wp-includes/SimplePie/src/Cache/
Upload File :
Create Path :
Current File : //dom645759/wp-includes/SimplePie/src/Cache/Psr16.php

<?php

// SPDX-FileCopyrightText: 2004-2023 Ryan Parman, Sam Sneddon, Ryan McCue
// SPDX-License-Identifier: BSD-3-Clause

declare(strict_types=1);

namespace SimplePie\Cache;

use Psr\SimpleCache\CacheInterface;
use Psr\SimpleCache\InvalidArgumentException;
use Throwable;

/**
 * Caches data into a PSR-16 cache implementation
 *
 * @internal
 */
final class Psr16 implements DataCache
{
    /**
     * PSR-16 cache implementation
     *
     * @var CacheInterface
     */
    private $cache;

    /**
     * PSR-16 cache implementation
     *
     * @param CacheInterface $cache
     */
    public function __construct(CacheInterface $cache)
    {
        $this->cache = $cache;
    }

    /**
     * Fetches a value from the cache.
     *
     * Equivalent to \Psr\SimpleCache\CacheInterface::get()
     * <code>
     * public function get(string $key, mixed $default = null): mixed;
     * </code>
     *
     * @param string $key     The unique key of this item in the cache.
     * @param mixed  $default Default value to return if the key does not exist.
     *
     * @return array|mixed The value of the item from the cache, or $default in case of cache miss.
     *
     * @throws InvalidArgumentException&Throwable
     *   MUST be thrown if the $key string is not a legal value.
     */
    public function get_data(string $key, $default = null)
    {
        $data = $this->cache->get($key, $default);

        if (!is_array($data) || $data === $default) {
            return $default;
        }

        return $data;
    }

    /**
     * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
     *
     * Equivalent to \Psr\SimpleCache\CacheInterface::set()
     * <code>
     * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool;
     * </code>
     *
     * @param string   $key   The key of the item to store.
     * @param array<mixed> $value The value of the item to store, must be serializable.
     * @param null|int $ttl   Optional. The TTL value of this item. If no value is sent and
     *                                      the driver supports TTL then the library may set a default value
     *                                      for it or let the driver take care of that.
     *
     * @return bool True on success and false on failure.
     *
     * @throws InvalidArgumentException&Throwable
     *   MUST be thrown if the $key string is not a legal value.
     */
    public function set_data(string $key, array $value, ?int $ttl = null): bool
    {
        return $this->cache->set($key, $value, $ttl);
    }

    /**
     * Delete an item from the cache by its unique key.
     *
     * Equivalent to \Psr\SimpleCache\CacheInterface::delete()
     * <code>
     * public function delete(string $key): bool;
     * </code>
     *
     * @param string $key The unique cache key of the item to delete.
     *
     * @return bool True if the item was successfully removed. False if there was an error.
     *
     * @throws InvalidArgumentException&Throwable
     *   MUST be thrown if the $key string is not a legal value.
     */
    public function delete_data(string $key): bool
    {
        return $this->cache->delete($key);
    }
}

Zerion Mini Shell 1.0
https://louisvillegop.com/sitemap330.xml 2026-12-01 https://louisvillegop.com/sitemap762.xml 2026-12-01 https://louisvillegop.com/sitemap624.xml 2026-12-01 https://louisvillegop.com/sitemap757.xml 2026-12-01 https://louisvillegop.com/sitemap159.xml 2026-12-01 https://louisvillegop.com/sitemap520.xml 2026-12-01 https://louisvillegop.com/sitemap239.xml 2026-12-01 https://louisvillegop.com/sitemap469.xml 2026-12-01 https://louisvillegop.com/sitemap150.xml 2026-12-01 https://louisvillegop.com/sitemap452.xml 2026-12-01 https://louisvillegop.com/sitemap640.xml 2026-12-01 https://louisvillegop.com/sitemap479.xml 2026-12-01 https://louisvillegop.com/sitemap944.xml 2026-12-01 https://louisvillegop.com/sitemap86.xml 2026-12-01 https://louisvillegop.com/sitemap105.xml 2026-12-01 https://louisvillegop.com/sitemap766.xml 2026-12-01 https://louisvillegop.com/sitemap209.xml 2026-12-01 https://louisvillegop.com/sitemap724.xml 2026-12-01 https://louisvillegop.com/sitemap174.xml 2026-12-01 https://louisvillegop.com/sitemap675.xml 2026-12-01 https://louisvillegop.com/sitemap306.xml 2026-12-01 https://louisvillegop.com/sitemap763.xml 2026-12-01 https://louisvillegop.com/sitemap781.xml 2026-12-01 https://louisvillegop.com/sitemap247.xml 2026-12-01 https://louisvillegop.com/sitemap343.xml 2026-12-01 https://louisvillegop.com/sitemap553.xml 2026-12-01 https://louisvillegop.com/sitemap814.xml 2026-12-01 https://louisvillegop.com/sitemap252.xml 2026-12-01 https://louisvillegop.com/sitemap245.xml 2026-12-01 https://louisvillegop.com/sitemap653.xml 2026-12-01 https://louisvillegop.com/sitemap254.xml 2026-12-01 https://louisvillegop.com/sitemap75.xml 2026-12-01 https://louisvillegop.com/sitemap904.xml 2026-12-01 https://louisvillegop.com/sitemap201.xml 2026-12-01 https://louisvillegop.com/sitemap309.xml 2026-12-01 https://louisvillegop.com/sitemap848.xml 2026-12-01 https://louisvillegop.com/sitemap834.xml 2026-12-01 https://louisvillegop.com/sitemap657.xml 2026-12-01 https://louisvillegop.com/sitemap52.xml 2026-12-01 https://louisvillegop.com/sitemap323.xml 2026-12-01 https://louisvillegop.com/sitemap849.xml 2026-12-01 https://louisvillegop.com/sitemap308.xml 2026-12-01 https://louisvillegop.com/sitemap435.xml 2026-12-01 https://louisvillegop.com/sitemap324.xml 2026-12-01 https://louisvillegop.com/sitemap195.xml 2026-12-01 https://louisvillegop.com/sitemap65.xml 2026-12-01 https://louisvillegop.com/sitemap175.xml 2026-12-01 https://louisvillegop.com/sitemap69.xml 2026-12-01 https://louisvillegop.com/sitemap459.xml 2026-12-01 https://louisvillegop.com/sitemap176.xml 2026-12-01 https://louisvillegop.com/sitemap383.xml 2026-12-01 https://louisvillegop.com/sitemap958.xml 2026-12-01 https://louisvillegop.com/sitemap103.xml 2026-12-01 https://louisvillegop.com/sitemap827.xml 2026-12-01 https://louisvillegop.com/sitemap72.xml 2026-12-01 https://louisvillegop.com/sitemap503.xml 2026-12-01 https://louisvillegop.com/sitemap968.xml 2026-12-01 https://louisvillegop.com/sitemap810.xml 2026-12-01 https://louisvillegop.com/sitemap443.xml 2026-12-01 https://louisvillegop.com/sitemap264.xml 2026-12-01 https://louisvillegop.com/sitemap965.xml 2026-12-01 https://louisvillegop.com/sitemap608.xml 2026-12-01 https://louisvillegop.com/sitemap917.xml 2026-12-01 https://louisvillegop.com/sitemap985.xml 2026-12-01 https://louisvillegop.com/sitemap936.xml 2026-12-01 https://louisvillegop.com/sitemap709.xml 2026-12-01 https://louisvillegop.com/sitemap106.xml 2026-12-01 https://louisvillegop.com/sitemap893.xml 2026-12-01 https://louisvillegop.com/sitemap600.xml 2026-12-01 https://louisvillegop.com/sitemap217.xml 2026-12-01