\Cache

Class for caching data on disk. For now we use one cache file for all pages of the service.

Cache drops each hour.

Summary

Methods
Properties
Constants
__construct()
get_instance()
__clone()
destroy()
set()
exists()
get()
flush()
$Data
$CachePath
No constants found
init()
No protected properties found
N/A
No private methods found
$Instances
N/A

Properties

$Data

$Data : string

Cache data.

Type

string

$CachePath

$CachePath : string

Cache file path.

Type

string

$Instances

$Instances : 

Created instances of different objects.

Type

Methods

__construct()

__construct() 

Constructor.

get_instance()

get_instance() 

Function returns instance of the object.

__clone()

__clone() 

Cloner.

destroy()

destroy() 

Destroy object.

set()

set(\string  $Key,   $Data) 

Method adds data to cache.

Parameters

\string $Key
$Data

exists()

exists(string  $Key) : boolean

Checking cache ffor data.

Parameters

string $Key
  • Data key.

Returns

boolean —
  • True if the data was found, false otherwise.

get()

get(string  $Key) 

Method gets data from cache.

Parameters

string $Key
  • Key of the requested data.

flush()

flush() 

Method flushes data on disk.

init()

init() 

Method inits cache.