Hi, i wanted to use this plugin to cache few blocks on my page, but it doesn't work as expected. I think this is a bug.
This is the code which in my template.
<?php if (wp_cacheblock_start('block-1')): ?> foo <?php endif; wp_cacheblock_end(); ?> <?php if (wp_cacheblock_start('block-2')): ?> bar <?php endif; wp_cacheblock_end(); ?>
Expected result: foo bar
Actual result: foo foo
I think the purpose of block name is to avoid specyfying unique key for each block, so this is my fix.
$unique_key = ''; to
$unique_key = 'cb_'.$blockname;