Support » Plugins » [Plugin: WP Super Cache] Auto-Refresh Cache when …

  • Hey, I have a wordpress blog set up where …

    On the is_single page for any particular post, it also lists all of the other posts in that same category in the sidebar.

    So, if I add a new post using some category, I can view that post and see all of the other posts of that category in the side-bar, that is good.

    I go to any other post in that category, that was already cached prior, and the Latest post (the one I just added) does not show up on the sidebar.

    SO ~ to fix this problem, i just need to have Super cache to simply Delete all the cache posts of a category when a new post is added to that category.

    Any ideas on how to do this ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • You’ll have to write a plugin that fires on the publish_post hook. It will have to get the categories from the post you’ve just published and then delete the category directories in wp-content/cache/wp-super-cache/hostname/

    The developer docs will help you.

    I’m really a beginner with this coding business, can anyone help me with it? I will gladly pay if thats what it takes.

    also ~ in the following folder …


    there are not category directories, rather a folder for each post. Is that how its suppose to be?

    It probably means that no anonymous user has visited one of your categories and those pages aren’t cached. Preloading doesn’t cache them.

    By categories do you mean the archive.php?

    I guess to better explain my site, it is a tv streaming site.

    Category = Series name (example: Simpsons)

    Post = Episode # ( Episode 1, Episode 2, etc)

    I believe the problem with my directories is the way my URLs are set up.
    for the post pages
    for archive.php

    I see folders for post pages that are called “simpsons-episode-1” etc

    and i also see a folder called “watch” and in it i see a folder called “simpsons” with just an index.html file within it.

    That’s fine. Your categories are in watch/. That’s how it works.

    Yes but deleting the category folder in watch/ does not delete the cached post folders in the root Cache/ directory

    Yeah, they’re separate files. You’ll have to delete files and directories in both locations.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WP Super Cache] Auto-Refresh Cache when …’ is closed to new replies.