When a request comes to a NestJS controller method with caching, the framework checks if the response is already stored in cache using a key. By default, NestJS generates a key based on method and parameters, but you can set a custom key using @CacheKey decorator. This custom key is used to check the cache. If the cache has data for that key, it returns it immediately. Otherwise, it runs the method, stores the result in cache with the custom key, and returns the data. This process ensures that cached data is correctly matched to requests, avoiding wrong data returns. The cache duration can be set with @CacheTTL. The execution table shows the steps: first request misses cache, runs method, stores result; next request hits cache and returns stored data. Variables like cache content and response change accordingly. Beginners often wonder why custom keys matter: they prevent cache collisions and ensure correct data is served. If keys are not unique, different requests might get wrong cached results. This visual trace helps understand how custom cache keys control caching behavior in NestJS.