|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Ancestral Smarty n00b
Joined: 10 Feb 2022 Posts: 2
|
Posted: Thu Feb 10, 2022 11:22 pm Post subject: Smarty 3 Caching Problem |
|
|
Hey Everyone,
We've recently upgraded from Smarty (v3.1.17) to V4.0.0-rc.0 and are having a slight problem.
To support multilingual in the older version of smarty we created a prefix onto the caching templates ie (
en_^9d3372d213f5136f1dc93c973161cfd526f530cd.foo.bar.tpl.php
fr_^9d3372d213f5136f1dc93c973161cfd526f530cd.foo.bar.tpl.php
)
we did this by overriding the isCached function of the parent smarty class with :
Code: | if (!isset($compile_id)) {
$compile_id = $this->locale["language"].'-'.$this->compile_id;
$cache_id = $compile_id;
} |
This no longer seems to be working. If you have any suggestions on what might have changed in this process please let us know and if you need any more details please let us know. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Feb 11, 2022 9:49 am Post subject: |
|
|
Start using compile_id directly. That's probably the only sane suggestion I could offer. |
|
Back to top |
|
Ancestral Smarty n00b
Joined: 10 Feb 2022 Posts: 2
|
Posted: Fri Feb 11, 2022 3:19 pm Post subject: |
|
|
AnrDaemon wrote: | Start using compile_id directly. That's probably the only sane suggestion I could offer. |
Hey thanks for the reply! Can you provide some more info on that? Every time we try and var_dump compile_id, it returns null. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|