Hello,
my code:
var_dump($cacheAdapter, $cacheKey, $select);
$cacheAdapter->save($cacheKey, $select);
var_dump($cacheAdapter->get($cacheKey));
die;
Output:
object(Phalcon\Cache\Backend\File)[43]
protected '_frontend' =>
object(Phalcon\Cache\Frontend\Data)[41]
protected '_frontendOptions' =>
array (size=1)
'lifetime' => int 10
protected '_options' =>
array (size=2)
'prefix' => string 'sCMS' (length=4)
'cacheDir' => string '/data/www/vhosts/kcentras/var/cache/long/' (length=41)
protected '_prefix' => string 'sCMS' (length=4)
protected '_lastKey' => string 'sCMSModules-registerAutoloaders-path.cache' (length=42)
protected '_lastLifetime' => null
protected '_fresh' => boolean false
protected '_started' => boolean false
string 'Role-getSelect-select.cache' (length=27)
array (size=1)
1 => string 'Administratorius' (length=16)
null
Xcache output:
object(Phalcon\Cache\Backend\Xcache)[43]
protected '_frontend' =>
object(Phalcon\Cache\Frontend\Data)[41]
protected '_frontendOptions' =>
array (size=1)
'lifetime' => int 10
protected '_options' =>
array (size=2)
'prefix' => string 'sCMS' (length=4)
'statsKey' => string '_PHCX' (length=5)
protected '_prefix' => string 'sCMS' (length=4)
protected '_lastKey' => string '_PHCXsCMSModules-registerAutoloaders-path.cache' (length=47)
protected '_lastLifetime' => null
protected '_fresh' => boolean false
protected '_started' => boolean false
string 'Role-getSelect-select.cache' (length=27)
array (size=1)
1 => string 'Administratorius' (length=16)
array (size=1)
1 => string 'Administratorius' (length=16)
Is file system cache too slow or is it the issue?