contao/core

1 contao 10 sites and BE_USER_LOGGED_IN on FE and $_SESSION['DISABLE_CACHE']

DVeris opened this issue · 8 comments

login to site1.com

but in other site - BE_USER_LOGGED_IN = false

and $_SESSION['DISABLE_CACHE'] = false

for example (site1.com/contao/):
if add news for site site2.com -> news cached
you need to wait for the cache reset
OR login to site2.com/contao/

ps in my case contao BE is on admin.mysite.com

pps
sorry for my english
difficult to translate

it is not comfortable

one login and work with all sites

it is not possible 😉

😭

then the question:

how to drop cache only for one page?

for example
$GLOBALS['TL_DCA']['tl_news']['config']['onsubmit_callback'] = array('tl_news','dropcache');

I don't think you can do that. The cache files names are "random", they are generated from the URL. So for the same URL with query parameters there will be multiple files. I think there was an extension for Contao 3.5 that tired to do that, but please refer to the forum for such questions.

We might be able to do so in future Contao 4 versions. Maybe even 4.6, I've got some POC here but it's not really working in 3.5 out of the box.