Challenge
Your biggest hurdle here is that your static block does not hole punch by default, but widgets will hole-punch automatically. So your goal should be to output all 3 widget rotators without the use of a static block.
So, then, my suggestion is that you get rid of the static block approach and instead create block reference areas to target with your widget. Classy Llama has a list of default regions available on their blog, referenced here:
Breadcrumbs
Left Column
Main Content Area
My Cart Extra Actions
Navigation Bar
Page Bottom
Page Footer
Page Header
Page Top
Right Column
Store Language
How to do it:
Creating a block reference is easy:
Define the block in layout XML:
<default>
<reference name="content">
<block type="core/text_list" name="some_block_name" as="some.block.name" translate="label">
<label>Widget Rotator Target Region</label>
</block>
</reference>
</default>
And then you'll need to echo it from your template to force it and all dynamically inserted widget blocks to render:
#file: 1column.html
<?php echo $this->getChildHtml('some_block_name'); ?>
Then, it should show up in your widget list:
This should output in your template now when FPC is enabled wrapped in hole punch comments.
Cheers!
Image and bullet content sourced from:
http://www.classyllama.com/blog/widgets-magento-enteprise
Use Session factory instead.
public function __construct(
\Magento\Customer\Model\SessionFactory $sessionFactory)
{
$this->sessionFactory = $sessionFactory;
}
Now you can use customer session with FPC enabled.
$customerSession = $this->sessionFactory->create();
if ($customerSession->isLoggedIn()) {
// customer is logged in;
}
Best Answer
Install Aoe_TemplateHints and utilize it to identify the block names and the cache status. After this you can specify in the configuration of the Lesti_FPC module to not cache the block in question.
More than likely the welcome block differs from the name that is standard
welcome
put the new block name in the lazy blocks area of the configuration in the admin:How Lesti_FPC works: