Removed category isn't removed from Categories cache


Description

After performing the following Postman request for removing some category

{{ServiceHost}}/{{ShopsApi}}/GetEntityView()
{ "entityId":"{{CategoryId}}", "forAction":"ReparentConfirmation", "itemId":"{{SellableItemId}}", "viewName":"PickParentConfirmation" }

and then adding a category with the same name in the BizFx tool, an error message appears stating that the category with this name exists.

Solution

To resolve the issue, clear categories cache via Postman tool. To do this, send a {{ServiceHost}}/{{OpsApi}}/ClearCacheStoreCache() request with the following body:

{
  "cacheStoreName": "HabitatShops",
  "cacheName": "HabitatShops.Categories",
  "environmentName": "HabitatShops"
}