I have a method that calls the following code from a web request.
Mage::app()->getCache()->save('bar', 'foo', array(), 60*5);
I have another method that calls
The method that loads the cached value returns the correct value when called via a web request, but always returns false when I run the code via the CLI.
The reason that I'm trying to run via the CLI is that the code in question is part of a cron task. I'm using
n98-magerun sys:cron:run foobar_cron to run the code.
My initial thought was that maybe running from the CLI would initiate a different store view, but I've stepped through the code and haven't found anything like that.
Trying to get the cached value when running via the web through admin works.
I'm using the standard Magento filesystem cache, and don't have any custom cache settings in my local.xml. Running EE 126.96.36.199.
I would expect that when I set a cache key via a web request that I could access the same value when running via the CLI and vice verca. Why isn't this working as expected, and what can I do to fix it?