Don't start session for certain requests (eg. Mosaico image processor)
Accessing any civicrm page triggers a call to session_start()
via maybe_start_session()
. But this can be quite problematic because it generally causes caching to be disabled/bypassed.
This is particularly a problem for Mosaico image backend located at civicrm/mosaico/img
which gets called many (1000s) of times when a bulk mail is sent. I've tested by commenting out the session_start()
and civicrm/mosaico/img
works fine, but that obviously breaks the rest of CiviCRM..
Any thoughts how we could solve this @bgm @haystack - I tried checking eg. get_query_args('q')
but it errors so I assume we can't check that early in the "boot" process?