[Petal] [BUG] translated fragments get cached in last accessed language

Bruno Postle bruno at mkdoc.com
Thu Mar 10 18:00:53 GMT 2005


This is a Petal bug.  Basically if I enable the Petal cache and do 
something like this:

  my $a = new Petal (file => 'foo', base_dir => 'bar', language => 'en');
     $a = new Petal (file => 'foo', base_dir => 'bar', language => 'fr');

..Petal continues to use 'en' templates.

Either the memory or disk cache will cause the problem, which 
explains why Chris was having to both restart apache and delete the 
petal_cache_* files.

I don't really have the time to track this down just now (new baby 
etc..), so I've added some tests that demonstrate the problem to 
Petal CVS:

  http://lists.webarch.co.uk/pipermail/mkdoc-commit/2005-March/000722.html

On Wed 23-Feb-2005 at 17:35 +0000, Chris Croome wrote:
> On Wed 23-Feb-2005 at 05:19:22PM +0000, Chris Croome wrote:
> > 
> > With MKDoc 1.4 you could havea directory like /bread-crumb-trail/
> > with a en.html and a tr.html file in it and on Turkish pages the
> > tr.html template would be used and on English pages the en.html
> > fragment would be used.
> > 
> > This is broken in MKDoc 1.6.
> > 
> > What happens is that the *first* language version to be accessed
> > appears to be cached and then pages of either language just
> > display the fragment in one language.
> > 
> > If one does rm -rf /tmp/petal* then loads a page in the other
> > lanugage than this version is cached.
>
> Actually I have done some moretesting and it appears that an apache
> restart is required to get the language to change... and not
> deleting the petal tmp files...

-- 
Bruno


More information about the Petal mailing list