kovshenin / surge

Surge is a very simple and fast page caching plugin for WordPress.
GNU General Public License v3.0
157 stars 11 forks source link

Publishing a new post or untrashing a post does not invalidate cache correctly #2

Closed kovshenin closed 2 years ago

kovshenin commented 2 years ago

Spotted by @roytanck. Publishing a new post does not invalidate the home page cache (or other related archives) because it's not been flagged with this new post ID. Untrashing a post has the same problem for the same reasons.

Reproduce:

The published post permalink will still work immediately as it's invalidated correctly by post ID, but things like "latest posts" widgets, etc. will also have a hard time picking up the new post until it expires due to TTL.

kovshenin commented 2 years ago

This should be fixed in #3 which is now merged.