Accessing to query variables inside InMemoryCache

I have a search query that is dependent on its variables instead of response. Is it possible to create in such a way an unique id for cache entry in apollo-client?