Documentation

Cacheable
in package

FinalYes

The Cacheable attribute.

Annotate your methods with the Cacheable attribute and their results will be cached.

Attributes
#[Attribute]
\Attribute::TARGET_METHOD

Table of Contents

Properties

$key  : string
$store  : string|null
$ttl  : null|DateInterval|DateTimeInterface|int

Methods

__construct()  : mixed
Create a new instance.

Properties

$store read-only

public string|null $store = null

$ttl read-only

public null|DateInterval|DateTimeInterface|int $ttl = null

Methods

__construct()

Create a new instance.

public __construct(string $key[, null|DateInterval|DateTimeInterface|int $ttl = null ][, string|null $store = null ]) : mixed
Parameters
$key : string

The key of the cache

$ttl : null|DateInterval|DateTimeInterface|int = null

The TTL value of the cache

$store : string|null = null

The cache store name


        
On this page

Search results