Open neel1996 opened 1 year ago
Route + Http method + Query param string + Request headers + Request body
E.g:
Let's assume "client-x" invokes a "mock_a" with the following request headers
- Authorization
- Content-type
- Host
These headers will decide the cache key. However, it is not necessary for the mock stored in the DB to have the same set of headers if strict header matching is not enabled for the mock.
In this case, if the user updates "mock_a", then the eviction will not remove the mock data from the cache as the hashed key will be different. Hence, all the existing cache needs to be evicted to ensure consistency
Summary
Explore springboot caching to enable it for mock responses. Use the hash generated from the request body + headers as the key for the cache
Scope of the issue
To improve mock response performance
Impacted area
Supporting artifacts
No response