I have created a new block to sit on the product detail page which contains dynamic content (the customer's recently-viewed products) that should not be cached. How can I switch off caching for that particular block?
I've tried the method mentioned in How to disable the cache for the block in Magento 2?, setting _isScopePrivate to false. That doesn't work, the block is still cached.
I have also tried disabling the cache for the whole page, which is not what I want but thought I'd see what happened. The page is still cached.
I have cleared out all folders under var and pub/static as well as running cache:clean. I have checked and the generated XML file definitely has cacheable="false" on the new block. But the page is still cached. This makes me think there is something else I'm missing.