Store registry | Database operations


RefreshRegistry and UpdateRegistry controller commands

To invalidate information in the StoreRegistry, or in other Registry objects, use either the RefreshRegistry or UpdateRegistry controller commands. These commands schedule a scheduler job for immediate execution, which causes commands to be executed in each Commerce server. The commands end up calling the refresh methods, or the update methods, of the specified registries, in each Commerce server.

When your code calls these controller commands, it should be careful to call the setAccCheck(false) method, to prevent that command from performing access control checks. That is because, for example, a user who has the authority to add a catalog to a store may not have the authority to execute the UpdateRegistry command directly. However, when a catalog is added to a store, the StoreRegistry must nonetheless be updated for that store.