unitedstates/congress — pull request #99 by GPHemsley (2013-11-15 23:20:30+00:00)
Title: Fix #98: Use the stricter and more reliable cache format that congress-legislators does.

This enforces a cache format of `{ hash: (SHA-1 hash), data: (cached data) }`. This allows us to share the cache with congress-legislators (assuming they have the same cache directory set), and allows us to have a more reliable check for whether the file has changed, based on the file hash. This method also allows us to change our hashing function at any time, without any ill effects. (It would just invalidate the cache file and create a new one.)

This also allows us to distinguish between cache files and pickle files (there are functions available for both), as they are treated as different types of files. (This unfortunately means you'll have to delete any existing cached YAML pickle files, or risk raising a TypeError.)