Updated transient caching to use proper Python hashing.