Caching bug when entries deleted
I’ve discovered a caching bug with regards to deleting posts.
When you click Manage > Posts, and then delete a post, the archive and category widgets (and probably some others I don’t have enabled) do not update to reflect the new post count. The numbers remain broken until a new entry is posted, or an existing entry is opened and “Saved”. Caching issues. *shakes fist ligthly*
Does it really wait till a new entry is posted, or is there a delay of an hour or so? Because sidebars are cached and can take up to an hour or so to update.
Send a feedback if the bug is consistent and it takes more than an hour to get the sidebar the way it’s supposed to be. Less than an hour is within the usual time it takes.
Cache entries should be forcibly expired when data is deleted, no? When I post a new entry, the widgets update immediately. It should be the same for removal. It should not be considered an expensive operation to regenerate the cache once upon the first view following deletion.
Also, depending on what you use for a caching layer, you should simply be able to decrement the value, not wipe it clean.
We’ve been discussing this on one of the recent WPMu tickets. The object cache appears to have been originally setup not to expire when certain things occur. A perfect example of this is the recent thread where we had someone looking at their cached rss feed and wondering how often if updates.
Not sure where staff stands on this but I know for the ticket where it was brought up, it got changed.
I could have sworn the sidebar was expiring when something like a new post occured. Not sure if deleteing a post would cause the expiration. It’s come up in the past but usually the cache has expired before anyone responded.
Based on my personal testing, the cache is updated when a new entry is posted, or even if an existing entry is opened for editing and then saved (without changes to the content even). It’s simply not updated on deletion of a post. Which is why I’m not too worried about this issue, because for me I’ll always just remember to “update” an existing entry if I ever delete an entry. :)
Feel free to send in a feedback and point this out to staff.
i’d like to hear the results of this. i recently imported content from one of my blogs to another, then changed my mind and deleted the posts from the new blog. the posts are still visible under the ‘archive’ sidebar= and the categories are all there even though i went through and deleted them.
my other concern is, when i DO start posting to this new blog, will it STILL have the archive data from posts that were deleted there?
it would be really handy to have a ‘clean slate’ button- hidden behind as many safeguards as necessary, but available. something that we could click on to reset the blog to its birthday suit, without having to delete it from existence. i don’t want to lose this new address, so i’m going to do whatever headache i have to in order to wipe it clean.
just wish i didn’t have to keep checking to make sure i got every last bit of the imported stuff cleaned up.
Please use this link to report your problem to staff on Monday http://wordpress.com/contact-support/
Support Temporarily Closed
Support will be closed Wednesday, Thursday, and Friday while the Automattic crew gathers in San Francisco in preparation for WordCamp 2007. We will re-open Monday morning around 9AM PDT.
yes, thanks timethief. i posted here after trying to contact support. mainly to bookmark the thread.
btw- wanted to say thank you drmike- you’ve been helpful to me on every search question i’ve run here- this, and mirroring sites (your tip on blogdesk is invaluable!) and a couple other questions i had. just wanted to let you know your input is fantastic!
people kept mentioning that though the archive doesn’t refresh after a delete, it DOES update with new posts- so i thought, GEE! why not put up a new post, and see if the archive clears its cache??
well, it works- i created a post consisting of the title ‘x’ and the body ‘x’ (two little letters), SAVED it instead of publishing it, and the archive and category tables both refreshed themselves and now show as empty.
just posting this so others with the problem can use this as a way to update their archive and category links. you don’t have to wait until you have another entry to put up, just make an edit to an existing post and save, or save a makeshift draft. either way, it will refresh the cache.
Ah, smart! Thanks for that.
Thanks for that tip. I have been having a similar issue with comments that I had deleted and edited. The changes did not show in the sidebar, yet when the link was clicked, it showed as empty.
Tried the ‘makeshift draft’ trick. Worked a charm.
The topic ‘Caching bug when entries deleted’ is closed to new replies.