Download the PHP package rothkj1022/php-cache-class without Composer
On this page you can find all versions of the php package rothkj1022/php-cache-class. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download rothkj1022/php-cache-class
More information about rothkj1022/php-cache-class
Files in rothkj1022/php-cache-class
Download rothkj1022/php-cache-class
More information about rothkj1022/php-cache-class
Files in rothkj1022/php-cache-class
Vendor rothkj1022
Package php-cache-class
Short Description A simple file based cache based from Erik Giberti's FileCache class, forked from lodev09/php-cache-class.
License MIT
Package php-cache-class
Short Description A simple file based cache based from Erik Giberti's FileCache class, forked from lodev09/php-cache-class.
License MIT
Please rate this library. Is it a good library?
Informations about the package php-cache-class
PHP FileCache Class (File base)
A simple file based cache based from Erik Giberti's FileCache class. See here
Enhanced Features
- Data is serialized and JSON encoded
- Cache data is encrypted by
mcrypt
- File Based Cache was explained here
Installation
Run the following command in your command line shell in your php project
Done.
You may also edit composer.json manually then perform :
Getting started
Example usage with composer
Example usage without composer
Local file source example
External http GET request example
Reference
Code reference for you to get started!
Properties
protected $root = '/tmp/';
- Value is pre-pended to the cache, should be the full path to the directory.protected $error = null;
- For holding any error messages that may have been raisedprivate $_encryption_key = 'Fil3C@ch33ncryptionK3y'
- Main key used for encryption (you need to set this up inside the class)
Methods
Public Methods
Cache::get($key)
- Reads the data from the cache specified by the cache keyCache::set($key [, $data, $ttl])
- Saves data to the cache. Anything that evaluates to false, null, '', boolean false, 0 will not be saved.$ttl
Specifies the expiry timeCache::delete($key)
- Deletes the cache specified by the$key
Cache::get_error()
- Reads and clears the internal errorCache::have_error()
- Can be used to inspect internal error
Private Methods
See code to see all private methods used like Cache::_encrypt($pure_string)
etc.
Changelog
Version 2.1.3
- Fixed: Stopped echoing guzzle request errors to screen
Version 2.1.2
- Integrated guzzle for more efficient http get requests
Version 2.1.1
- Changed: Renamed class back to Erik Giberti's original name, FileCache
Version 2.1.0
- Added: Composer integration
- Added: changelog
Credits
2010 - Authored by Erik Giberti 2011-2014 - Rewritten by Jovanni Lo / @lodev09 2018 - Modified by Kevin Roth / @rothkj1022
License
Released under the MIT License. See LICENSE file.
All versions of php-cache-class with dependencies
PHP Build Version
Package Version
The package rothkj1022/php-cache-class contains the following files
Loading the files please wait ....