Cache invalidation issue – static front page
-
Hello Stefano,
we found another bug. This applies to sites which have Settings –> Reading –> Front page displays set to “A static page”.
Cache for such page is not cleared when you publish a new blog post. Imagine you have homepage with a featured posts slider and some intro text and then a real blog page on /blog address with a classic list of recent posts.
Under these conditions, your cache.php sets the front page type “page” instead of “home”. The condition
if (is_home() || is_front_page()) $data['type'] = 'home';
Needs to be changed to:
if (is_home() || is_front_page()) $data['type'] = 'home';
Then the special front page cache is cleared properly when a new blog post is created.
This is crucial if the cache time is set to full day (your current default I believe) and it’s set to only clear the post, homepage and archive cache when a post is published/updated.
Could you please roll out a quick update version, so we don’t have to fix this by hand on a lot of our sites?
Thanks,
Martin
- The topic ‘Cache invalidation issue – static front page’ is closed to new replies.