classe Cache (Voir la source)

Méthodes

mixed
__construct(string $base_directory)

Cache constructor.

static 
confirgure(string $base_directory)

Cache configuration method

static bool
add(string $key, mixed $data, int|null $time = null)

Add new enter in the cache system

static bool
addMany(array $data)

Add many item

static bool
forever(string $key, mixed $data)

Adds a cache that will persist

static bool
push(string $key, array $data)

Add new enter in the cache system

static mixed
get(string $key, mixed $default = null)

Retrieve an entry in the cache

static bool
addTime(string $key, int $time)

Increase the cache expiration time

static int|bool|string
timeOf(string $key)

Retrieves the cache expiration time

static bool
forget(string $key)

Delete an entry in the cache

static bool
has(string $key)

Check for an entry in the cache.

static bool
expired(string $key)

Check if the cache has expired

static void
clear()

Clear all cache

mixed
__call(string $name, array $arguments)

__call

Détails

mixed __construct(string $base_directory)

Cache constructor.

Paramètres

string $base_directory

Valeur de retour

mixed

static confirgure(string $base_directory)

Cache configuration method

Paramètres

string $base_directory

static bool add(string $key, mixed $data, int|null $time = null)

Add new enter in the cache system

Paramètres

string $key
mixed $data
int|null $time

Valeur de retour

bool

static bool addMany(array $data)

Add many item

Paramètres

array $data

Valeur de retour

bool

static bool forever(string $key, mixed $data)

Adds a cache that will persist

Paramètres

string $key

The cache key

mixed $data

Valeur de retour

bool

static bool push(string $key, array $data)

Add new enter in the cache system

Paramètres

string $key

The cache key

array $data

Valeur de retour

bool

static mixed get(string $key, mixed $default = null)

Retrieve an entry in the cache

Paramètres

string $key
mixed $default

Valeur de retour

mixed

static bool addTime(string $key, int $time)

Increase the cache expiration time

Paramètres

string $key
int $time

Valeur de retour

bool

static int|bool|string timeOf(string $key)

Retrieves the cache expiration time

Paramètres

string $key

Valeur de retour

int|bool|string

static bool forget(string $key)

Delete an entry in the cache

Paramètres

string $key

Valeur de retour

bool

static bool has(string $key)

Check for an entry in the cache.

Paramètres

string $key

Valeur de retour

bool

static bool expired(string $key)

Check if the cache has expired

Paramètres

string $key

Valeur de retour

bool

static void clear()

Clear all cache

Valeur de retour

void

mixed __call(string $name, array $arguments)

__call

Paramètres

string $name
array $arguments

Valeur de retour

mixed

Exceptions

BadMethodCallException