Added support for caching with APC and Memcached