Implement caching

Using memcached; not fully implemented, but on its way.