Enhancements to Memcache caching

Changed the default expiration time from "never expire" to 12h (with 5%
variance). Added option for flushing the memcache if it's enabled,
connected and supported by the PHP version.