Content caching speed up

Fixes #224.