using cache for middleware