Review 1751 backported
Static method for cache cleaning.