added cache delete and page type update event to the sync method

if you change the files for a page type u need to click the sync button and then click edit and save.

this adds the cache delete and the update event to the sync method, and this way we only need to click the sync button to have the changes live.