Cache invalidation and management

reading the documentation it’s not clear to us what is the parameter invalidateCacheForwarding and if we need to enable it on both frontend and backend.

Another question is what is the mechanism of cache invalidation: the frontend call the /invalidate on the backend and vice-versa?
We don’t understand what “entity” triggers the /invalidate.

invalidateCacheForwarding is about sending invalidate request forward. You should enable it in VSF-API to forward request to VSF-PWA. Then you would have flow like:

  1. Someone updates products in backend, e.g. Magento 2
  2. Magento 2 sends invalidate request to VSF-API as configured
  3. VSF-API purges Redis Cache for own responses and forwards invalidate request to the VSF-PWA (as configured in invalidateCacheForwarding)
  4. VSF-PWA purges Redis Cache for own responses. If you enabled forwarding in VSF-PWA - it would send a request somewhere forward.
1 Like

Thanks a lot for this response, that’s so clear!