• Hello dear Donncha,

    I am using wp-super-cache on one of my blogs where I do not post often (www.r-statistics.com).
    In it, I set the expiration date of the cache to “0” (meaning, if I got it right – keep them forever). But I also said to clear the cache I publish a post or clear it if a comment is added.

    However, I have just got a comment held for moderation. The comment was spam and I marked it as spam. But when I went to view the caching of the site, I noticed that the homepage (and the post on which the comment was submitted) had their cache refreshed.

    Shouldn’t it be that the cache refreshes only when a comment is posted (not marked as spam)? Or did the cache clear because I was an admin or something of this sort? (I also looked at the cache from incognito mode from chrome)

    Cheers,
    Tal

    http://wordpress.org/extend/plugins/wp-super-cache/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Unfortunately it does clear some of the cache as you found out. There’s no way for the plugin to find out if the comment was moderated or not as it’s deleted BEFORE the plugin does anything. At least from what I remember anyway.

    Thread Starter talgalili

    (@talgalili)

    Thanks Donncha. That is a bummer, but not too much…

    BTW, I’ve got two feature requests to suggest:
    1) Clear “the homepage” (or maybe also the category/tags) when a post or page is published (and nor remove ALL cached files).
    2) Set different expiry time for homepage vs other types of pages

    Thank you – I really love your plugin 🙂

    1. When a post is made the homepage is cleared and possibly some other pages too but the whole cache is deleted ONLY when you select an option on the Advanced settings page.
    2. It’s on the TODO list but it’ll be a pain to implement. 🙁

    Thread Starter talgalili

    (@talgalili)

    Hi Donncha,

    Regarding 2 – oh well…

    Regarding 1 – any chance you would flush these options out? Currently, I suspect this does not always happen (when I have tested it) – and I would love to see it clearly presented as an option so I could tinker with it to my needs.

    With regards,
    Tal

    Thread Starter talgalili

    (@talgalili)

    Hi Donncha,

    One more question – does the preload option includes the homepage?
    Is it possible to exclude it?

    I tried setting the preload expiry time to 0, and the rest of the cache to 1800. Yet I see that my homepage doesn’t refresh after several hours.

    (The website is r-bloggers.com)

    I just set the homepage to not cache – but it is not an ideal solution 🙁

    Thanks,
    Tal

    Thread Starter talgalili

    (@talgalili)

    I seem to be getting to this over and over – that what I need is a “clear the cache of homepage/tag/category/search when a new post is published”…

    I am sorry that I am repeating myself 😀

    If you have any ideas of how to achieve something similar to that in the current plugin – I’d be very happy to know about it!

    With regards,
    Tal

    I am pretty sure WP Super Cache already clears the homepage when a new post is made.

    After all the posts are preloaded the plugin cleans up any “old” cached files. This should include the homepage. Did you check the actual cached file in cache/supercache/xxxx/index.html ?

    Thread Starter talgalili

    (@talgalili)

    Hi Donncha,
    Thank you for getting back to me.

    What do you mean when you say after ALL the posts are preloaded?
    So if I have 10K posts, does that mean that the homepage is cleared only after they are ALL cached? (because that is my situation on some blogs)

    Also, I have just noticed a behavior I didn’t know about (which was replicated successfully on two blogs):
    I look and see that I have wp-super-cache and wp-cache files, and also many spam comments.
    When I deleted the spam comments, all of my wp-cache files were deleted.
    (This is on blogs where I set the expiration time to be 0 on both preloaded and on “normal” cached files).
    Why is this happening? Is there any way to prevent from spam comments to have so much influence on my blog’s caching?

    Thank you for looking into this Donncha,
    Best,
    Tal

    Yes, after all posts are preloaded then other older pages are cleared out.

    That behaviour with the wp-cache files is expected unfortunately. It’s inherited code from the WP Cache plugin. Most people use the Supercache files so it hasn’t been a major problem. I don’t think I’ll have time to fix this problem any time soon, sorry.

    Thread Starter talgalili

    (@talgalili)

    Hi Donncha,

    Thank you for the answers.

    I guess you understand my problem at this point – I hope you will add features so I could have the homepage refresh once in half an hour or so, while the rest of the website will stay cached.

    Thanks.

    Thread Starter talgalili

    (@talgalili)

    Hi Donncha,

    Suggestion –

    Consider changing the text:
    “Clear all cache files when a post or page is published”
    To
    “Clear all cache files when a post or page is published or updated”

    Good idea, thanks!

    Thread Starter talgalili

    (@talgalili)

    Great 🙂

    BTW Donncha,
    What about adding a recommendation for using disqus/intense-debate?
    If I understand it correctly – they allow one to keep a page cached while keeping the commenting functionality active (without the need to refresh the page with the comment, or the sidebar for “recent comments”).

    Those services sync back to the WordPress site don’t they? Do they fire off the comment_post action when they do or do the plugins insert the comment directly?

    If they cause the comment_post action to fire the plugin will clear the cached file for that post..

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Plugin: WP Super Cache] Does removing spam comments clears the cache?’ is closed to new replies.