1.2.960. PSR-6 Usage

PSR-6 is the cache standard for PHP.

The goal of PSR-6 is to allow developers to create cache-aware libraries that can be integrated into existing frameworks and systems without the need for custom development.

It is supported by an set of interfaces, that one may use in the code.

<?php

namespace MyNamespace;

// MyCacheItem implements the PSR-7 CacheItemInterface.
// This MyCacheItem is more of a black hole than a real CacheItem.
class MyCacheItem implements \Psr\Cache\CacheItemInterface {
    public function getKey() {}
    public function get() {}
    public function isHit() {}
    public function set($value) {}
    public function expiresAt($expiration) {}
    public function expiresAfter($time) {}
}

?>

See also PSR-6 : Caching.

1.2.960.1. Connex PHP features

1.2.960.1.1. Specs

Short name

Psr/Psr6Usage

Rulesets

All, Appinfo, CE, Changed Behavior

Exakat since

0.11.6

PHP Version

All

Severity

Time To Fix

Precision

Very high

Available in

Entreprise Edition, Community Edition, Exakat Cloud