![]() |
Cache PHP widget separately for each language
I use different content output for each language in the my CMS PHP Direct Execution Widgets.
Code:
if ($vbulletin->userinfo['languageid']) == 1) { |
It doesn't seem to take in to account the language or style setting, as you found out. But I learned something about widgets (or at least php direct execution widgets), which is that there is a separate cached version per user. So if you switch the language setting you'll have to wait for the cache to expire, but if different users have different languages chosen, they should be OK.
If that doesn't work for you, I think you'd have to set the cache time to 0 and handle any caching yourself (see packages/vbcms/widget/execphp.php). |
Thank you very much, Kevin!
I went back to this problem and I solved it with your advise. I have changed 'userid' to 'languageid' in the getHash function and now my widgets caches separately for each language and my pages loads much faster! Of course it is a very bad practice editing the vb-scripts, but I didn't see another way( |
All times are GMT. The time now is 02:21 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|