Documentation

cache
in package

A class that is used to cache data.

Table of Contents

$cache  : mixed
get()  : void
Checking if the cache file is valid and if it is, it is including the cache file.
isValid()  : bool
Used to check if the cache file exists.
set()  : void
It's writing the content to the cache file.
gen()  : array<string|int, mixed>
A PHPDoc annotation that is used to tell the IDE that the function returns an array with the keys `key` and `path`.

Properties

Methods

get()

Checking if the cache file is valid and if it is, it is including the cache file.

public static get([string|null $key = null ]) : void
Parameters
$key : string|null = null
Return values
void

isValid()

Used to check if the cache file exists.

public static isValid([string|null $key = null ]) : bool
Parameters
$key : string|null = null
Return values
bool

set()

It's writing the content to the cache file.

public static set(mixed $content[, string|null $key = null ]) : void
Parameters
$content : mixed
$key : string|null = null
Return values
void

gen()

A PHPDoc annotation that is used to tell the IDE that the function returns an array with the keys `key` and `path`.

private static gen(string|null $key) : array<string|int, mixed>
Parameters
$key : string|null
Return values
array<string|int, mixed>

Search results