Zed. The source code to build a world.

CacheVoid
in package

"blackhole" void cache

This class doesn't cache information, it's void wrapper get will always return null set and delete do nothing

It will be used by default if no cache is specified.

This class implements a singleton pattern.

Table of Contents

Properties

$instance  : CacheVoid

Methods

delete()  : mixed
Deletes the specified key's data
get()  : mixed
Gets the specified key's data
load()  : Cache
Gets the cache instance, initializing it if needed
set()  : mixed
Sets the specified data at the specified key

Properties

$instance

public static CacheVoid $instance = \null

the current cache instance

Methods

delete()

Deletes the specified key's data

public delete(string $key) : mixed
Parameters
$key : string

the key to delete

get()

Gets the specified key's data

public get(string $key) : mixed
Parameters
$key : string

the key to fetch

Return values
mixed

the data at the specified key

load()

Gets the cache instance, initializing it if needed

public static load() : Cache
Return values
Cache

the cache instance, or null if nothing is cached

set()

Sets the specified data at the specified key

public set(string $key, mixed $value) : mixed
Parameters
$key : string

the key where to store the specified data

$value : mixed

the data to store


        
On this page

Search results