Download the PHP package xnicon/simple-php-cache without Composer
On this page you can find all versions of the php package xnicon/simple-php-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package simple-php-cache
Simple PHP Cache
Quick Start
To install Simple PHP Cache, simply:
$ composer require xnicon/php-simple-cache
Code Examples
Example One
Example Two
Example Three
Functions
__construct($name, $dir, $ext)
Class constructor
$name
- name of the cache (defaultphpcache
)$dir
- directory where the cache will be stored (default TEMP directory)$ext
- extension of the cache file (default.cache
)
set($key, $value, $ttl = 0)
Writes data to cache
$key
- key of the value$value
- value$ttl
- Time To Live (in how many seconds value will expire)
get($key, $default = false)
Reads data from cache
$key
- key of the value$default
- is default value return if value by$key
not found (defaultfalse
)- return:
- bool(false) - value not cached or expired
- array - if success
remove($key)
Removes data from cache
$key
- key of the value- return:
- bool(false) - key not found
- bool(true) - success
has($key)
Check exists and not is expired cache
$key
- key of the value- return:
- bool(false) - not found
- bool(true) - is found
clean()
clean cache file
- return:
- bool(false) - fail
- bool(true) - success
All versions of simple-php-cache with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.6
The package xnicon/simple-php-cache contains the following files
Loading the files please wait ....