Cache is not available in cross script execution #836
|
Hello, We have one common file that is included in every execution say common.php with following code common.php from one file I set cache say, file1.php that includes common.php like Now I want to access that cached data in file2.php that includes common.php like.
But I get empty item as $InstanceCache is a new fresh instance, Your support is appriciated. |
Replies: 2 comments 1 reply
|
It's because you call In your case you can do the following: |
It's because you call
CacheManager::setDefaultConfigafter building your cache instance.using
CacheManager::setDefaultConfigis useful if you have multiple cache pool instances.In your case you can do the following: