How to check if a user is logged in in Magento 2

How to check if a user is logged in in Magento 2

Recently i had to do something very simple: Show a button in the product listing page of a Magento 2 depend if the use was logged in or not. Just do a $session->isLoggedIn() one would say, right? It turns out that this is way more from the truth than i initially...
Flush Magento Cache vs Flush Cache Storage

Flush Magento Cache vs Flush Cache Storage

This is question is asked and answered on Stack Overflow before, but it always surprises me how many people still don’t know the difference. The difference is quite simply though: Flush Magento CacheDeleted everything in the cache that is owned by Magento.Flush...