Closed Pok4 closed 2 years ago
Hello curious contributor ! Since it seems to be your first contribution, make sure that you've been:
Hello,
Please read the Wiki: https://github.com/PHPSocialNetwork/phpfastcache/wiki/%5BV4%CB%96%5D-Configuration-Options
And use the ConfigurationOption class of generic options or the Files\Config class for specific options.
Also take a look at our tests here: https://github.com/PHPSocialNetwork/phpfastcache/blob/bcd068ff1a78cd1475a4d8c13ed371711465ef40/tests/ReadWriteOperations.test.php#L48
Cheers, Georges
Ok, now i made the code to look like this:
//PHP Fast Cache
use Phpfastcache\Helper\Psr16Adapter;
use Phpfastcache\Drivers\Files\Config as FilesConfig;
$cacher = new Psr16Adapter((getenv('CACHE_TYPE')== false) ? 'files' : getenv('CACHE_TYPE'),
new FilesConfig([
'path' => __DIR__.'/cache',
'secureFileManipulation' => true,
'securityKey' => '_phpfastcache_',
]));
and everything is working :) thank you!
Ok, now i made the code to look like this:
//PHP Fast Cache use Phpfastcache\Helper\Psr16Adapter; use Phpfastcache\Drivers\Files\Config as FilesConfig; $cacher = new Psr16Adapter((getenv('CACHE_TYPE')== false) ? 'files' : getenv('CACHE_TYPE'), new FilesConfig([ 'path' => __DIR__.'/cache', 'secureFileManipulation' => true, 'securityKey' => '_phpfastcache_', ]));
and everything is working :) thank you!
Jusr don't forget to pass the new FilesConfig
object as the second argument of new Psr16Adapter(
(watch the class signature on your IDE)
Hi, guys :)
I'm use this one. I have a question... How to set a path for cache directory ? Now, my configuration is this:
please, tell me how to set a path for cache files, because i don't know where is stored now. I want to be DIR.'/cache';