Incorporated Try monads in caching code.