On 25 Aug 2009, at 16:57, Matthias Dietrich wrote:

Hi Wade,

Am 25.08.2009 um 13:48 schrieb Wade Stuart:
Why cant you just do a:

# ... incrementally add new lexicons
   Locale::Maketext::Lexicon->import({
       de => [Gettext => 'local/hello/de.po'],

   })
... on change instead of reloading apache?

because this would only affect the current apache child process (at least under mod_perl). All other clients will still have the old lexicon.


Right - so use some form of caching scheme to save a lexicon 'generation' key.

Bump the value of that key when the lexicon is changed. The first time you use the lexicon in a hit (or just at the start of the hit), check the lexicon generation and reload if needed?

This approach is simpler than futzing around with process management, simpler than messing with multiple signals, simpler to scale to n boxen (just use memcache - can change this by config if you're using Catalyst::Plugin::Cache), etc...

Cheers
t0m




_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to