I think I have found a bug with the IWarehouseRepository.
Currently there is no way to clear the cache.
If you want to get a list of warehouses:
//var warehouseRepository = ServiceLocator.Current.GetInstance(); //return warehouseRepository.List();
This will get cached items.
Decompiling the source code: WarehouseRepositoryDatabase it clearly gets from the cache:
List warehouseList1 = this._cache.Get("EP:Commerce:WL") as List;
There is no public method on the interface to clear the cache or refresh it.
I think I have found a bug with the IWarehouseRepository.
Currently there is no way to clear the cache.
If you want to get a list of warehouses:
This will get cached items.
Decompiling the source code: WarehouseRepositoryDatabase it clearly gets from the cache:
There is no public method on the interface to clear the cache or refresh it.