Storing runtime configuration

Hi All,
I hope everybody red “book” :wink:

I’m trying to store data, here is simple test:
$test = [‘’, ‘’];
_ debug(Configure::store(‘allow_ip’, ‘default’, $test));_
_ debug(Configure::restore(‘allow_ip’, ‘default’));_
_ debug(Configure::check(‘allow_ip’));_
_ debug(Configure::read(‘allow_ip’));_

I cannot to restore data, but I see the file tmp/cashe/cake_allow_ip exists and has data :slight_smile:

Could somebody clarify How it works or it doesn’t works ?

Thank you.

Looks like the restore() is not working. The cached data cannot be read and loaded back into Configure. Does Cache::read('allow_ip', 'default'); return the data you’re expecting? Internally that is what Configure::restore() is doing.

Hi Markstory,
Thanks for you answer.
Yes it works.
But strange why doesn’t work restore (cake version is 2.6.4)

Not sure, you might want to try upgrading as it could be a problem that has been fixed since 2.6.4.