Scheduled Job - Delete Expired Prices

Vote:
 

Hi,

I was wondering if anyone has come across a scheduled job that will remove expired prices after a certain number of days?

I would envisage this is similar to the remove expired carts but for prices.

Thanks

Paul

#218317
Edited, Mar 10, 2020 21:41
Vote:
 

Expired prices will not be returned when you use IPriceService, and unlike expired carts I don't think they will cause a performance degradation

but if you want to, you can traverse through the catalog https://leanpub.com/epicommercerecipes/read_sample , limiting to only variants and packages (unless you have prices for products, which is not common), then load prices using IPriceDetailService, delete the expired prices then save back

#218341
Mar 11, 2020 7:23
Vote:
 

Hi Quan,

Good information to know there will not be any performance degradation.

As more a good practice, it would be better to have something what would maintain obselete data. A recent query I ran against a clients PriceDetail table returned over 4 million prices that had expired. This seems expense to me and should be maintained.

Thanks for the info, I have read your book, lots of good information in there and great to see your support to the Episerver community, keep it up.

Paul

#218347
Mar 11, 2020 8:43
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.