A high-performance backend cache system. It is intended for use in speeding up dynamic web applications by alleviating database load. Well implemented, it can drops the database load to almost nothing, yielding faster page load times for users, better resource utilization. It is simple yet powerful.
$config = array(
/*
* Default storage
* if you set this storage => "files", then $cache = phpFastCache(); <-- will be files cache
*/
"storage" => "auto", // files, sqlite, auto, apc, wincache, xcache, memcache, memcached,
/*
* Default Path for Cache on HDD
* Use full PATH like /home/username/cache
* Keep it blank "", it will automatic setup for you
*/
"path" => "" , // default path for files
"securityKey" => "", // default will good. It will create a path by PATH/securityKey
/*
* FallBack Driver
* Example, in your code, you use memcached, apc..etc, but when you moved your web hosting
* The new hosting don't have memcached, or apc. What you do? Set fallback that driver to other driver.
*/
"fallback" => array(
"example" => "files",
"memcache" => "files",
"apc" => "sqlite",
),
/*
* .htaccess protect
* default will be true
*/
"htaccess" => true,
/*
* Default Memcache Server for all $cache = phpFastCache("memcache");
*/
"server" => array(
array("127.0.0.1",11211,1),
// array("new.host.ip",11211,1),
),
);
Tried this configuration with memcache and resulted in errors. After an hour of tinkering around, I found that this was maybe old and the one in the wiki works:
The site says:
Tried this configuration with memcache and resulted in errors. After an hour of tinkering around, I found that this was maybe old and the one in the wiki works:
https://github.com/khoaofgod/phpfastcache/wiki/2.2-Setup-Files%3F