Cache (memoize) a function's output using Django's caching API