purgeAdmin should also send request.body to cacheStore.clearByUid #55
Labels
issue: enhancement
New feature or request
severity: medium
source: plugin
status: confirmed
version: Strapi 4
Issues related to the versions supported by Strapi 4
Hey team!
I believe the
purgeAdmin
function should also includectx.request.body
on theparams
that's sent tocacheStore.clearByUid
allowing for url paths that include more than just theid
.Reasoning for that is that today when you hit save on the admin, the
params
object only include theid
of the object, only purging urls that include:id
as a result and not working for:slug
or other cases, so this example here: https://strapi-community.github.io/strapi-plugin-rest-cache/guide/strategy/cache-custom-routes.html#frontmatter-title does't seem to be purged when hitting save, only when you explicitly clickPurge REST Cache
on the entity (that already adds the whole object to thecacheStore.clearByUid
call).Here's the change I did that seem to fix the issue:
This issue body was partially generated by patch-package.
Let me know if that looks good to you guys and I can also send a PR with this.
The text was updated successfully, but these errors were encountered: