Do not JSON encode/decode cache data. Callers must choose their encoding.
Fixed tests.