Forums

[resolved] [WP super cache] Don't cache dynamic content (2 posts)

  1. Maskime
    Member
    Posted 2 years ago #

    Hi everyone,

    I'm using WP super cache on my blog, but i'm having troubles with the <!--mclude--> functionnality to disable caching on dynamic contents (wich are comments)

    Simply put once the page is cached the whole comment bloc doesn't show anymore...

    The comment part is not a WP plugin and it works perfectly when cache is not activated. And i don't understand why because i use the functionnality on an another part of the cached page and it seems to work correctly.

    If no solution can be found i'd be glad if somebody could tell me how i can find the cached page to delete it when a comment is send through my system.
    For the moment cache file look like this :
    wp-cache-d2f8cb24b123e256e6016633390a9136.html (wich is strange because page have a "nice" name on an another server <= would it be a configuration problem ?)

  2. Maskime
    Member
    Posted 2 years ago #

    Updating the post, in case somebody had the same problems...

    - Didn't find why the mclude function doesn't work.
    + Found the function to use to delete cache on a post :
    wp_cache_post_change($iPostId)
    This function manage Half mode and Super cache mode and it clear the cache for the requested post id

    Notes :
    1. Don't forget that once the page is cached, NO PHP CODE WILL BE EXECUTED, the static page will be serve to the client
    2. Seems that some configurations need you to close the browser to be taken in account
    3. If you want wp_cache_post_change($iPostId) to work, remeber that you need to include $_SERVER['DOCUMENT_ROOT'] . '/wp-config.php'
    4. If you get static page with this kind of name : 'wp-cache-d2f8cb24b123e256e6016633390a9136.html' it means that the super cache system is not working

    Thats all for the moment

Topic Closed

This topic has been closed to new replies.

About this Topic