| Joomla! http://forum.joomla.org/ |
|
| Joom!Fish and cache enabled http://forum.joomla.org/viewtopic.php?f=123&t=116130 |
Page 1 of 1 |
| Author: | array2001 [ Tue Nov 14, 2006 4:15 pm ] |
| Post subject: | Joom!Fish and cache enabled |
Hi, I am using Joomla 1.0.11 + JoomFish 1.7, and I'm having problems when I turn cache on. News are showed in the latest cached language (no matter what language you select). It only appears in the right language when cache expires.. The only workaround for this issue that I know is to turn cache off, but then the loading speed sucks.. Does anyone know of a fix for this issue? Thanks! Raúl. |
|
| Author: | Robin [ Tue Nov 21, 2006 12:54 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
Moderator note; topic split from tips/tricks topic. |
|
| Author: | array2001 [ Sun Nov 26, 2006 11:23 am ] |
| Post subject: | Re: Joom!Fish and cache enabled |
Thanks RobInk, What I did is to change the Cache-Lite code to add a flag in the cache file names, thus the language is taken into account. This way the languages are not messed up when I turn on the Joomla cache. |
|
| Author: | pastoweb [ Wed Dec 20, 2006 8:01 am ] |
| Post subject: | Re: Joom!Fish and cache enabled |
Could you explain us exactly what you modified and where? Please post the new code... |
|
| Author: | array2001 [ Wed Dec 20, 2006 11:12 am ] |
| Post subject: | Re: Joom!Fish and cache enabled |
Sure, I am far from being a php coder, so the altered code is not probably the best approach, anyhow it works and as it is a really small change I didn't bother trying to get it better written. The idea is to distinguish between languages in the cache generated files, so I have added a flag at the end of every cache file name: ENG for English piece of content, and ESP for Spanish piece of content: Code: cache_94afbfb2f291e0bf253fcf222e9d238e_0a44f3ad03329c1101771b2cea700cb2_ENG cache_94afbfb2f291e0bf253fcf222e9d238e_0a44f3ad03329c1101771b2cea700cb2_ESP The code change in file includes/Cache/Lite.php is as follows: Code: function _setFileName($id, $group) { global $mosConfig_lang; if ($mosConfig_lang == english ) { $idioma = "_ENG"; } if ($mosConfig_lang == spanishi ) { $idioma = "_ESP"; } if ($this->_fileNameProtection) { $this->_file = ($this->_cacheDir.'cache_'.md5($group).'_'.md5($id).$idioma); } else { $this->_file = $this->_cacheDir.'cache_'.$group.'_'.$id.$idioma; } } It is working now with cache on at http://www.conscious-robots.com |
|
| Author: | akede [ Sun Jan 14, 2007 5:30 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
Can you all check the latest Joomla! core 1.0.12 - we fixed something related to the cache. Alex |
|
| Author: | array2001 [ Mon Jan 15, 2007 5:04 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
I've upgraded my site to Joomla! Core 1.0.12 using the patch Joomla_1.0.11_to_1.0.12-Stable-Patch_Package.zip This patch doesn't include any CacheLite file, so I see no change from 1.0.11.. |
|
| Author: | akede [ Mon Jan 15, 2007 6:09 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
The changes we did wasn't in the CacheLite files but in the files that called this class. Need to check |
|
| Author: | array2001 [ Mon Jan 15, 2007 9:31 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
OK, so I removed the changes in CacheLite described in this thread, i.e. restored original CacheLite _setFileName function. And I get a weird behaviour: if you go to a content page, it seems to work ok, whenever you switch the language you get the right translated content, however, if you go to the frontpage or a category/section page, the first cached language remains (language switching is not working). I will keep the original CacheLite code for some hours so you can see it for yourself online at http://www.conscious-robots.com |
|
| Author: | akede [ Tue Jan 16, 2007 5:15 am ] |
| Post subject: | Re: Joom!Fish and cache enabled |
Ok we will try to hunt down what's the issue still. Thx for the feedback |
|
| Author: | array2001 [ Tue Jan 16, 2007 9:58 am ] |
| Post subject: | Re: Joom!Fish and cache enabled |
Thanks! I'll restore the _setFileName function trick for the time being.. |
|
| Author: | ScannerD [ Fri Jan 26, 2007 5:39 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
And I thought I was going crazy... same problem here... The lovely thing called multilingual Joomla! sites Turned off the caching... for the time being... ![]() Hope you fix it soon... |
|
| Author: | array2001 [ Sun Feb 04, 2007 8:02 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
Well, while you wait for an official fix, you could turn chache on and apply the _setFileName function patch as explained above. This is what I did, and it is working fine for two languages. |
|
| Author: | mbreiden [ Wed Feb 21, 2007 5:09 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
array2001 wrote: Sure, I am far from being a php coder, so the altered code is not probably the best approach, anyhow it works and as it is a really small change I didn't bother trying to get it better written. The idea is to distinguish between languages in the cache generated files, so I have added a flag at the end of every cache file name: ENG for English piece of content, and ESP for Spanish piece of content: Code: cache_94afbfb2f291e0bf253fcf222e9d238e_0a44f3ad03329c1101771b2cea700cb2_ENG cache_94afbfb2f291e0bf253fcf222e9d238e_0a44f3ad03329c1101771b2cea700cb2_ESP The code change in file includes/Cache/Lite.php is as follows: I'm no php coder either, but instead of using the if statements I just changed the $idioma to $mosConfig_lang, so my section looks like: Code: function _setFileName($id, $group) { global $mosConfig_lang; if ($this->_fileNameProtection) { $this->_file = ($this->_cacheDir.'cache_'.md5($group).'_'.md5($id).$mosConfig_lang); } else { $this->_file = $this->_cacheDir.'cache_'.$group.'_'.$id.$mosConfig_lang; } } |
|
| Author: | array2001 [ Wed Feb 21, 2007 5:28 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
Cool, much more compact and elegant This way you don't need to alter the code again if you add additional languages... which was a problem of the code I sent originally.Thanks mbreiden. |
|
| Author: | B3ll0 [ Sun Mar 04, 2007 4:15 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
10x guys for this nice hack! :o :D A little change from me to include "_" before language descriptor: ;) Code: /**
* Make a file name (with path) * * @param string $id cache id * @param string $group name of the group * @access private */ function _setFileName($id, $group) { global $mosConfig_lang; if ($this->_fileNameProtection) { $this->_file = ($this->_cacheDir.'cache_'.md5($group).'_'.md5($id).'_'.$mosConfig_lang); } else { $this->_file = $this->_cacheDir.'cache_'.$group.'_'.$id.'_'.$mosConfig_lang; } } |
|
| Author: | gaupe [ Sat Jul 21, 2007 10:51 am ] |
| Post subject: | Re: Joom!Fish and cache enabled |
Hmm i have implemented this on my website but found out there's still a sort of problem with the caching (it is'nt there if you turn the cache off so it must be the cache that causes it.) I checked it on the webite mentioned http://www.conscious-robots.com and it shows the same behaviour. This is that if you click on a story and therewith open it in the main window. and then from there choose another language. It, not allways, shows the same article but in many cases another (previous cached?) article.... I'm not sure what causes this nor do i know how to solve it, somebody any ideas? |
|
| Author: | gaupe [ Sat Jul 21, 2007 7:27 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
Well for me i installed Jaccelerator and this caching software seems to work flawless for me. i see that it is language specific (in the cache files) i allso choose what to cache and what not so it is allso much more customizable. |
|
| Author: | gesellix [ Sat Jul 21, 2007 8:30 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
gaupe wrote: Hmm i have implemented this on my website but found out there's still a sort of problem with the caching (it is'nt there if you turn the cache off so it must be the cache that causes it.) I checked it on the webite mentioned http://www.conscious-robots.com and it shows the same behaviour. This is that if you click on a story and therewith open it in the main window. and then from there choose another language. It, not allways, shows the same article but in many cases another (previous cached?) article.... I'm not sure what causes this nor do i know how to solve it, somebody any ideas? it sems to me like the weird behaviour only (and always) comes when calling the main site, i.e. without "parameters". did you try disabling your SEF component? |
|
| Author: | gaupe [ Sun Jul 22, 2007 6:32 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
ah well like i said the moment i put in the jaccelerator the problem vanished. can be that the sef has some to do with it i dont know but as i dont want to do without the sef (i want search engines to find my translations) it wont help me much if it would work without sef. i now played with the site all day and with jaccelerator all is fine. |
|
| Author: | array2001 [ Sun Jul 22, 2007 9:41 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
gaupe wrote: Hmm i have implemented this on my website but found out there's still a sort of problem with the caching (it is'nt there if you turn the cache off so it must be the cache that causes it.) I checked it on the webite mentioned http://www.conscious-robots.com and it shows the same behaviour. This is that if you click on a story and therewith open it in the main window. and then from there choose another language. It, not allways, shows the same article but in many cases another (previous cached?) article.... I'm not sure what causes this nor do i know how to solve it, somebody any ideas? Yup, that is my site. I know that problem, but I've been postponing the investigation of a fix as I've been busy with other stuff.. I thought that the problem is caused by the JoomSEF component.. Are you you using the same component for SEO? I could try the same as you and use JAcceletator and see if the problem disappear. That would confirm that is nothing to do with SEF, and Joomla caching is the root cause. Anyhow I think there's something wrong with my JoomSEF as I have aroung 20000 translated URLs in the database! And most of them seem to return 404... |
|
| Author: | gaupe [ Sun Jul 22, 2007 9:53 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
I am using the sh404sef and it looked until now to be without any problem had the cache of jaccellerator in 1d1h (The default) and was busy all day translating in two extra languages (dutch and norwegian from english) later when we finished translating i was playing a litle with the setup and (put jaccelerator on 5d1 allso put the urlcache of the sh404sef on ) and suddenly i got all 404s too and all links where pointing to wron language parts of the content..... cleaned out all the caches from both the sh404sef and jaccellerator and all was fine again.... Hmmm have to play with this a little longer i guess to see if this solution is worry free..... but am curious at your findings. |
|
| Author: | perandre [ Fri Aug 03, 2007 7:15 pm ] |
| Post subject: | Sv: Joom!Fish and cache enabled |
I'm having trouble with cache + joomfish + sh404SEF. No 404, but only default languge articles show up... |
|
| Author: | gaupe [ Fri Aug 03, 2007 11:35 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
ah well played with it for some days and didn't see any problems anymore. the clearing of all the caches in accelerator and the sef and then no changes anymore in the settings of these two gave errorfree driving.... as far as i can see. |
|
| Author: | perandre [ Sat Aug 04, 2007 7:05 am ] |
| Post subject: | Sv: Joom!Fish and cache enabled |
Interesting, I will try a little harder... |
|
| Author: | array2001 [ Mon Nov 05, 2007 4:33 pm ] |
| Post subject: | Re: Joom!Fish and cache enabled |
It seems that upgrading to Joom!Fish 1.8 fixed this problem for me So I keep on using JoomSEF, Joomla Cache and JF 1.8, and finally I can switch any content from one language to another without a problem. You can have a look at http://www.conscious-robots.com. Please, let me know if you see any bad language switch with your browsers.. Thx! Cheers, Raul. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|