Caching-Plugins and Ajax-Page-Parts

I’d love to use »W3 Total Cache« for my WordPress page. Caching the full page is really fasten up the site. But there is a lot of current community activity and most pages including some “latest comments” or “new notifications” parts (self made boxes in template, not sidebar widgets)

How can i be sure that only these parts of the page are up to date while the rest can stay in cache as long as i don’t empty it? Whats a good workaround?

Read More

Building thoses Boxes with AJAX?

Hope i could explain myself… thanks a lot.

Related posts

Leave a Reply

1 comment

  1. You can use following code to exclude page from caching.

    define('DONOTCACHEPAGE', true);
    //Disables page caching for a given page.
    define('DONOTCACHEDB', true);
    //Disables database caching for given page.
    define('DONOTMINIFY', true);
    //Disables minify for a given page.
    define('DONOTCDN', true);
    //Disables content delivery network for a given page.
    define('DONOTCACHCEOBJECT', true);
    //Disables object cache for a given page
    

    and to exclude particular functions or lines of code include it in foolwing syntax of mfunc.

     //Example 1:
    <!-- mfunc any PHP code --><!-- /mfunc -->
    //Example 2:
    <!-- mfunc -->any PHP code<!-- /mfunc -->
    //Example 3:
    <!--MFUNC           -->
                                      echo rand();
    <!--/mfunc -->
    //Example 4:
    <!-- mclude path/to/file.php --><!-- /mclude -->
    //Example 5:
    <!-- mclude -->path/to/file.php<!-- /mclude -->