Before storing cache data it checks filecache_is_readdeleteonly() and if true the cache in question is deleted to invalidate any existing record that might have been created. But there is an error in the function which means the cache is always deleted when it's being set from a CLI script (including when running the cron via Drush).

I think following the line should be an AND rather than an OR:

substr(php_sapi_name(), 0, 3) == "cli" || (extension_loaded('posix') && posix_getuid() == 0)

Patch attached.

Comments

edjeavons created an issue.