@Ravi Kiran Thanks for reaching out. I believe you might be already looked into the Azure APIM cache policy document but sharing the same for the community members.
You can leverage the APIM management REST API to perform supported operations on APIM. You can refer to the cache REST document for the operation supported for APIM cache.
Is there a way I can find out cache key for my API, which I can invalidate at any point of time if needed before specified elapse time.
You can leverage the List by Service API to list all the caches created for your APIM instance and to invalid/delete the cached you can call the Delete operation
Is there a way I can invalidate all the cache at once in the instance
Yes, you need to first call the List by Service API and loop in through all the return cache array, and call the Delete Operation on the individual cache.
Can I specify a custom cache key to the API where I will have handle to invalidate when needed
Whenever you create the cache within the policy then you need to assign the cache key. If your requirement is that based on input body/parameter while calling the APIM API you want to delete/invalid the cache then yes you need to write your custom logic in your policy to handle this. You can leverage the C# expression in your policy to handle it. Now to invalid the cache you need to leverage the Send request policy to create the HTTP request to invalid/delete the cache as per your business requirement.
To get familiar with the Azure REST API you can refer to this document.