Zend certified PHP/Magento developer

Cacheable blocks independent of query params

Hello #realmagento folks,

How to make page blocks cacheable based on the store-id & request-URI (irrelevant of query params though) in Magento 2?

  • /some-page -> blocks are cached
  • /some-page?abc=xyz -> blocks are not cached (but I want it to be cached)

Note that block caching stops working as soon as some query string params are added.

Thanks