Better implementation of memcached-unavailable replacement class.