simple python 2 caching method that produces gzipped JSONs form dictionaries