Added clear cache on save method and corrected cache clearing to work with irregular base urls.