Closed kennylajara closed 8 years ago
Hi @thingNumber1 If you don't use composer, then follow this example: https://github.com/PHPSocialNetwork/phpfastcache/blob/final/examples/legacy.php
Now if you want to use multiple driver instance, this is possible:
$MemcacheCache = CacheManager::getInstance('memcache');
$ApcCache = CacheManager::getInstance('apc');
$XcacheCache = CacheManager::getInstance('xcache');
For each driver instance (also called ItemPool) that you get, you can get an item using getItem(). See the Wiki: https://github.com/PHPSocialNetwork/phpfastcache/wiki#item-api
Cheers, Georges
Also please note that the Website is not yet updated, for now you must rely on the Wiki, we'll update the website asap.
Thanks you.
Ok, Thanks. =)
Hi,
I am new on this of caching (first time doing it) and I want to implement a multicaching but I am not pretty sure how to do it. I found an example in the site but is kind of confusing to me (maybe due to the tag thing).
I'd like to see if you can provide the simplest posible example of preparing the use of the library (not using composer, yet), preparing the APC and memcached instances and trying to check the value of a variable and setting it for both instances if does not exist.
This is the logic of what I am looking for:
Well, I hope you understand my example, if you don't ask and I'll try to explain what you don't get. I know there is an example in the webpage but I couldn't undestand. It loks to me like if both instanses use the same variable, so, I don't get how to set different expiration time and so.