Use JSON to serialize cache