moved header and footer into cache.