Automattic / Automattic/wp-super-cache

It's not refreshing related categories and tags on CPT page saves

Open
#966 3 comments 0 reactions 0 assignees View on GitHub
[Plugin] Super Cache bug
Dominant language
PHP
Stars
436
Forks
130
Avg merge
15h 11m
Merged PRs (30d)
10

Description

Hello sirs! I noticed that when you save a page/post/custompost it only refresh the cached copy of THAT POST, but it is not updating the corresponding categories and tags that post belongs to. Due to this, for example, if you switch a published post to draft state, the category and tag pages where it used to be indexed will continue showing an outdated link to the post, resulting in a 404 error if you click on it.
I bet it only requires you to read what the associated categories and tags are, and just delete them from cache to force a refresh.

The actual behaviour is SPECIALLY PROBLEMATIC in ecommerce sites, where browsing the archive pages by product categories or product tags is an absolutely normal and in fact intended feature of the website.

Can you fix it?
Thanks!!

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named. Start by tracing the save path for posts and custom post types, then inspect how related category and tag caches are invalidated. Reproduce a published post becoming a draft and verify that its category and tag archive pages no longer show the stale link.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.