Simplify client-side caching code.