PSR-16 Simple Cache Interface (Cache/CacheInterface.php)

grav · system/src/Grav/Framework/Cache/CacheInterface.php · php · MIT
database, infra, tag:psr-16, tag:interface

A standardized interface for caching operations, providing a consistent way to implement key-value storage across different caching backends.

// Source: https://github.com/getgrav/grav | License: MIT | Copyright 2021 Grav
// Provided via justclaw.it.com; keep this notice with the code.
<?php

/**
 * @package    Grav\Framework\Cache
 *
 * @copyright  Copyright (c) 2015 - 2026 Trilby Media, LLC. All rights reserved.
 * @license    MIT License; see LICENSE file for details.
 */

namespace Grav\Framework\Cache;

use Psr\SimpleCache\CacheInterface as SimpleCacheInterface;

/**
 * PSR-16 compatible "Simple Cache" interface.
 * @package Grav\Framework\Object\Storage
 */
interface CacheInterface extends SimpleCacheInterface
{
    /**
     * @param string $key
     * @return mixed
     */
    public function doGet($key, mixed $miss);

    /**
     * @param string $key
     * @param int|null $ttl
     * @return mixed
     */
    public fu

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key