Use pickle instead of JSON for caching.