[Catalyst] Restarting Catalyst on request or doing something per request

Matthias Dietrich mdietrich at cpan.org
Mon Aug 24 19:51:50 GMT 2009


Hi Chris,

Am 24.08.2009 um 04:43 schrieb Chris:

> Can you use catalyst::plugin::cache as the backend for the lexicon?
> Then refreshing the texts involves clearing the cache, and updates are
> transparent.

I took a quick look at C::P::Cache and I don't think it is possible to  
use this module as the backend with adequate work.   
Locale::Maketext::Lexicon stores the text somewhere under its own  
package name in a hash.  To use a cache backend here would mean  
creating a module around L::M::L which alters "internal" data whereas  
this new module would depend on the current L::M::L module version.  I  
don't think this would be good.

So from my point of view the best way would be to reload the lexicon  
data once it has changed.  As this is not possible without manually  
restarting apache, this leads me to reloading the lexicon after the  
database contents has changed within each apache client on request  
start (before any lexicon text is requested).  I could initiate this  
within an auto sub in Root.pm, but this seems very ugly.  I guess a  
new plugin (like C::P::I18N::DBI::Reloader) would be good.  What do  
you think?

Thanks for your help,
   matt

-- 
rainboxx Matthias Dietrich
Freier Software Engineer

rainboxx                  |  Tel.: +49 (0) 151 / 50 60 78 64
Tölzer Str. 19            |  Mail: matt at rainboxx.de
70372 Stuttgart           |  WWW : http://www.rainboxx.de

XING: https://www.xing.com/profile/Matthias_Dietrich18
GULP: http://www.gulp.de/profil/rainboxx.html



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: Signierter Teil der Nachricht
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090824/c117f685/PGP.pgp


More information about the Catalyst mailing list