Caching-Plugins and Ajax-Page-Parts

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 -->