Cache for post requests based on the body content

hello.
i am trying to set caching for my graphql end point.(i have some other rest end points too.)
i see that there is an option to cache post request according to body content.
i tried to enable it but it didnt work. maybe my settings where incorrect:
the configs i tried:

“extended_paths”: {
“advance_cache_config”: [
{
“method”:“POST”,
“path”:"",
“cache_key_regex”: “query*”
}
]

1.whats the miminum configs needed to set cache for post request based on the body content (while having other endpoints too).?
2.is cache_key_regex is part of the url of the request or part of the body?.
3.is it okay to leave cache_key_regex=null and path=null. so it will cache all post requests
of the basic graphql url or are there other configs needed so it will not effect the other endpoits?

Hi @Netanel_Av and welcome to the community. I am checking this and would get back to you

Thanks for your patience. You will find my answer underneath the respective questions

1.whats the miminum configs needed to set cache for post request based on the body content (while having other endpoints too).?

You need to set the path, method and response code

2.is cache_key_regex is part of the url of the request or part of the body?.

It’s part of the body.

3.is it okay to leave cache_key_regex=null and path=null. so it will cache all post requests
of the basic graphql url or are there other configs needed so it will not effect the other endpoits?

Yes I think so. I have been testing this out to know the result and it looks that way. You could also use a regex in the path to affect only very specific urls.