开发者

symfony caching of mobile view / one url with 2 sf_formats

开发者 https://www.devze.com 2023-04-03 19:24 出处:网络
I activated caching for my app. Works great. I have have a mobile format using layout.m.php Which is set to

I activated caching for my app. Works great. I have have a mobile format using

layout.m.php

Which is set to

sf_format: m

So when i open an URL with the specific userAgent i don't get the layout.m but instead the cached version of the original and vice versa.

how to config. the cache specific to sf_form开发者_开发百科at?


I think you need to cache partials and components instead of the whole application. At least for the action/template where you're detecting the device type of the user.

It seems that you applied cache to a dynamic part where you're looking for every request if the user is using a mobile device...

0

精彩评论

暂无评论...
验证码 换一张
取 消