Automattic / Automattic/wp-super-cache
cache of a post saved where the frontpage, therefore loading the frontpage showed the post content
- Dominant language
- PHP
- Stars
- 436
- Forks
- 130
- Avg merge
- 15h 11m
- Merged PRs (30d)
- 10
Description
Less than 24 hours ago I updated WPSC to the latest 1.5.7.1 after being on 1.4.8 (modded) for a long time, so probably this is a bug introduced by some intermediate version.
So what happend, basically an author contacted me because the frontpage of the site at `example.org/` was showing a very old post from 2013. That old post has its own permalink `example.org/old-post/` but it was actually showing its content at `example.org/`
After a moment of panic, I went to the directory `/wp-content/cache/supercache/example.org/` with FileZilla and deleted:
- index.html (was the post)
- index.html.gz (was the post gzipped)
- meta-wp-cache-xxx.php (was the frontpage with some get parameters)
- meta-wp-cache-yyy.php (was the frontpage with some other get parameters)
- wp-cache-xxx.php (was the frontpage gzipeed)
- wp-cache-yyy.php (was the frontpage gzipeed)
Then I went to load the site, the frontpage was correct and I verified its cache was been rebuildt correctly. It's a static page set up as the frontpage in Reading by the way.
WPSC 15.7.1
expert mode / mod_rewrite on "standard" unix apache dedicated webserver.
make known users anonymous
gzip on
mobile devide support on
garbage collection is off (managed via cron cli php script which deletes stale files by checking every 5 min interval files older than certain amount of time depending in the directory they are in; eg: frontpage is deleted more frequently, etc)
note: I'm returning 0 with the new filter:
> add_filter('wpsc_delete_related_pages_on_edit', '__return_zero');
because I have a lot af activity in dashboard by several authors and I want to have full control on cache files to make it last much time possibile, even if the data is not up to date at 100% with the database.
I know it's along shot and so far this bug has only occurred one time but maybe the devs may have a clue knowing the code better than me.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by examining the cache files under /wp-content/cache/supercache/example.org/ and the wpsc_delete_related_pages_on_edit filter behavior, using the reported static frontpage and mod_rewrite setup as reproduction context. Done means the frontpage cache cannot serve an old post's content at example.org/, including when the filter returns zero.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100