cache pages and clear them