Abel Hoogeveen
ae861b8b6e
The library comes with 6 drivers: APC, file, memcached, redis, wincache and a dummy driver. Which driver you can use is dependant on your situation. In order to build this a Driver library has been implemented. A driver can be called using (FuzeWorks\)Libraries::getDriver($libraryName); This will load the driver library and the requested library. Regular library rules apply. Every driver comes with the same methods (found in documentation) but the 2 most important are $driver->save($objectName, $object, $time); whereby $time is an integer in minutes; and $driver->get($objectName); which will receive the cached value; To load a cache driver you need to run something like the following: $cache = FuzeWorks\Libraries::getDriver('cache', array('adapter' => 'apc', 'backup' => 'file')); This will try and load the APC cache driver. If this fails it will try and load the file driver. If all fails it will load the dummy driver. The dummy driver does not actually save anything, it's just a placeholder until you fix your environment. More information can be found in the documentation.
0 lines
Plaintext
0 lines
Plaintext