Make sfAPCCache work with php-apcu
|Assignee:||Dan Gillean||% Done:|
|Category:||Performance / scalability||Estimated time:||4.00 hours|
|Target version:||Release 2.1.2|
|Google Code Legacy ID:||Tested version:|
APCu (php-apc) was introduced in PHP 5.5 to provide user cache capabilities after the removal of APC. In AtoM, cache_engine (app.yml) defaults to sfAPCCache, which didn't work with early versions of APCu due to API incompatibilities - sfAPCuCache was introduced to solve the problem (see #5470).
First releases of PHP 5.5 used to produce a fatal error when cache_engine was "sfAPCCache," probably because APCu was not providing the function apc_store() (see #L34), but it seems like it was added in newer releases, including the version bundled in Ubuntu 14.04.
So now users running PHP 5.5 but not using sfAPCuCache are experiencing cache invalidation issues, e.g. updating settings/list doesn't refresh the corresponding keys. But it works when using sfAPCuCache.
This problem needs to be revisited, hopefully sfAPCCache can be updated to work for both apc and apcu while we keep sfAPCuCAche around just for compatibility issues (a subcless without overriding members of sfAPCCache maybe?).