Simplify client-side caching code.

Neat