chore(cache): Add some nice new internal APIs for caching

This *greatly* simplifies caching logic, especially for memcache-related code. See Datalist.php for the example in this PR.
Cool, I didn't look into memcached code for some time.