• Resolved marke1

    (@marke1)


    Anybody know how to make WP-Cache force itself to refresh its cache of the blog’s home page?

    Seems as though refreshing a post or page is easy enough, but the home page, I haven’t tracked down yet.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • the homepage is index.php which also reads the posts and pumps it through the filters, plugins , themes etc. So in reality it should all ready update the cache for the home page, also if the content of the home pages doesnt change, the cache isn’t changed.

    whats the URL you are talking about??

    Thread Starter marke1

    (@marke1)

    Ya, I know all that.

    I need to refresh it myself because there is some Ajax and other Javascript that needs to work on specific $_SERVER variables when a browser lands on the home page to stuff content into a div. So in that case, using a cached copy of the home page doesn’t work because the home page is built differently for particular visitors. New plugin…

    Thread Starter marke1

    (@marke1)

    Found the answer, it’s easy.

    https://mnm.uib.es/gallir/wp-cache-2/

    Posted here for future reference should others come looking for the solution:

    How do I make certain parts of the page stay dynamic?

    It’s compatible with Staticze Reloaded. From their FAQ:

    There are two ways to do this, you can have functions that say dynamic or include entire other files. To have a dynamic function in the cached PHP page use this syntax around the function:

    <!–mfunc function_name(‘parameter’, ‘another_parameter’) –>
    <?php function_name(‘parameter’, ‘another_parameter’) ?>
    <!–/mfunc–>`

    The HTML comments around the mirrored PHP allow it to be executed in the static page. To include another file try this:

    <!–mclude file.php–>
    <?php include_once(ABSPATH . ‘file.php’); ?>
    <!–/mclude–>`

    That will include file.php under the ABSPATH directory, which is the same as where your wp-config.php file is located.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Force WP-Cache to refresh home page?’ is closed to new replies.