class Cache (View source)

Methods

mixed
__construct(string $base_directory)

Cache constructor.

static 
confirgure(string $base_directory)

Cache configuration method

static bool
add(string $key, mixed $data, int $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, mixed $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 bool|string|int
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($name, $arguments)

__call

Details

mixed __construct(string $base_directory)

Cache constructor.

Parameters

string $base_directory

Return Value

mixed

static confirgure(string $base_directory)

Cache configuration method

Parameters

string $base_directory

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

Add new enter in the cache system

Parameters

string $key
mixed $data
int $time

Return Value

bool

static bool addMany(array $data)

Add many item

Parameters

array $data

Return Value

bool

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

Adds a cache that will persist

Parameters

string $key

The cache key

mixed $data

Return Value

bool

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

Add new enter in the cache system

Parameters

string $key

The cache key

mixed $data

Return Value

bool

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

Retrieve an entry in the cache

Parameters

string $key
mixed $default

Return Value

mixed

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

Increase the cache expiration time

Parameters

string $key
int $time

Return Value

bool

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

Retrieves the cache expiration time

Parameters

string $key

Return Value

bool|string|int

static bool forget(string $key)

Delete an entry in the cache

Parameters

string $key

Return Value

bool

static bool has(string $key)

Check for an entry in the cache.

Parameters

string $key

Return Value

bool

static bool expired(string $key)

Check if the cache has expired

Parameters

string $key

Return Value

bool

static void clear()

Clear all cache

Return Value

void

mixed __call($name, $arguments)

__call

Parameters

$name
$arguments

Return Value

mixed