Cache
in package
FinalYes
Permite leer y escribir de forma sencilla información que se almacena en la carpeta /MyFiles/Tmp/FileCache.
Table of Contents
Constants
- EXPIRATION = 3600
- FILE_PATH = '/MyFiles/Tmp/FileCache'
Methods
- clear() : void
- delete() : void
- deleteMulti() : void
- expire() : void
- get() : mixed
- has() : bool
- remember() : mixed
- Obtenemos el valor almacenado si existe o, por el contrario, almacenamos lo que devuelva la función callback.
- set() : void
- withMemory() : CacheWithMemory
- Devuelve una instancia que combina caché de archivos con memoria
- filename() : string
Constants
EXPIRATION
public
mixed
EXPIRATION
= 3600
FILE_PATH
public
mixed
FILE_PATH
= '/MyFiles/Tmp/FileCache'
Methods
clear()
public
static clear() : void
delete()
public
static delete(string $key) : void
Parameters
- $key : string
deleteMulti()
public
static deleteMulti(string $prefix) : void
Parameters
- $prefix : string
expire()
public
static expire() : void
get()
public
static get(string $key[, mixed $default = null ]) : mixed
Parameters
- $key : string
- $default : mixed = null
has()
public
static has(string $key) : bool
Parameters
- $key : string
Return values
boolremember()
Obtenemos el valor almacenado si existe o, por el contrario, almacenamos lo que devuelva la función callback.
public
static remember(string $key, Closure $callback) : mixed
Parameters
- $key : string
- $callback : Closure
set()
public
static set(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
withMemory()
Devuelve una instancia que combina caché de archivos con memoria
public
static withMemory() : CacheWithMemory
Return values
CacheWithMemoryfilename()
private
static filename(string $key) : string
Parameters
- $key : string