safer caching, and reenabling async caching
Merge pull request #992 from dimagi/safer-cache

safer caching, and reenabling async caching