cache *seems* to be working (no cache on widgets)

This commit is contained in:
Mike Jolley 2011-09-20 13:00:37 +01:00
parent 9f3996a13c
commit 420bbfa2b9
4 changed files with 11 additions and 3 deletions

View File

@ -20,6 +20,6 @@
<?php do_action('woocommerce_after_main_content'); // </div></div> ?>
<!--mfunc do_action('woocommerce_sidebar') --><?php do_action('woocommerce_sidebar'); ?><!--/mfunc-->
<?php do_action('woocommerce_sidebar'); ?>
<?php get_footer('shop'); ?>

View File

@ -14,6 +14,6 @@
<?php do_action('woocommerce_after_main_content'); // </div></div> ?>
<!--mfunc do_action('woocommerce_sidebar') --><?php do_action('woocommerce_sidebar'); ?><!--/mfunc-->
<?php do_action('woocommerce_sidebar'); ?>
<?php get_footer('shop'); ?>

View File

@ -28,6 +28,6 @@
<?php do_action('woocommerce_after_main_content'); // </div></div> ?>
<!--mfunc do_action('woocommerce_sidebar') --><?php do_action('woocommerce_sidebar'); ?><!--/mfunc-->
<?php do_action('woocommerce_sidebar'); ?>
<?php get_footer('shop'); ?>

View File

@ -537,3 +537,11 @@ if ( ! function_exists('readfile_chunked')) {
return $status;
}
}
/**
* Cache
**/
function woocommerce_prevent_sidebar_cache() {
echo '<!--mfunc get_sidebar() --><!--/mfunc-->';
}
add_action('get_sidebar', 'woocommerce_prevent_sidebar_cache');