Add cache clearning functionality to posts and pages to prevent duplication on rebuild.