Modified persistent caching to use proper Python hashing.