Problem with caching in Apollo Server

I am using Apollo Server and Apollo Gateway with Spring Boot Java application and developing APIs through GraphQL. I am trying server side caching with Apollo Server through
@cacheControl directive. I have annotated my type which I have to cache with @cacheControl(maxAge: 240). When I execute my API to fetch the list of my caching annotated type then instead of taking the data from cache after first time it is always hitting the database and ignoring the caching mechanism. I have followed all the steps from Apollo Server docs.
Can anyone help me with this issue?