Xbox One, Xbox One S, and Xbox One X appear to cache textures and meshes more often during modded play than other times. The build up of these files can corrupt over time and cause gameplay issues and lag.
Rebuilding the database is part of good PlayStation maintenance.
So when should you do it?
When preparing your console for a new game.
Uninstalling a Game
After uninstalling a game you no longer wish to play.
If the console seems laggy or there are connectivity issues.
After installing mods with large texture files.
While playing with mods with large texture files.
As part of normal maintenance of your Playstation 4.
As part of normal maintenance of your Xbox One.