[Catalyst] Restarting Catalyst on request or doing something per
request
Chris
hutchinson.chris at gmail.com
Mon Aug 24 22:48:26 GMT 2009
> 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?
>
You're facing the overhead of checking for text changes on each
request, so a plugin hooking early in the request sounds effective. I
wonder if you could force a reload using a SIG{USR1} handler and avoid
a per-request check?
Good luck with it.
- Chris
More information about the Catalyst
mailing list