Added caching for the header and footer template