I wish to invalidate the cache when there is a POST or DELETE request with 200 response (which can be configured as a conditional as part of the Step). Otherwise, Response Cache fulfills all my caching needs.
Are the two Policies incompatible or is there a downside to using Response Cache with Invalidate Cache?
As you note the InvalidateCache policy is designed to work with the PopulateCache / LookupCache tandem.
For the response cache, you can skip the cache lookup and thereby effect a refresh by using the SkipCacheLookup condition as documented here.
Note the following quote from the documentation:
The optional SkipCacheLookup condition (if configured) is evaluated in the request path. If the condition evaluates to true, then the cache look up is skipped and the cache is refreshed.
A common use of conditional cache refresh is a condition that defines a specific HTTP header that causes the condition to evaluate to true. A scripted client application could be configured to periodically submit a request with the appropriate HTTP header, explicitly causing the response cache to refresh.
The documentation example shows how to configure a client header that will force this bypass:
Hi @jaycrowww , sure, nothing about the ResponseCache bypass prevents your team from utilizing a mixture of cache policies in your workflow, including the LookupCache/PopulateCache/InvalidateCache as might be appropriate. Your team can select the caching policy design that best meets your use case. Please do be mindful of cache-internals documentation to understand the operational constraints of this persistence mechanism.