[Catalyst] Restarting Catalyst on request or doing something per
request
Chris
hutchinson.chris at gmail.com
Mon Aug 24 02:43:57 GMT 2009
Hi Matt,
On Mon, Aug 24, 2009 at 6:10 AM, Matthias Dietrich<mdietrich at cpan.org> wrote:
> Hi,
>
> I'm using the plugin C::P::I18N::DBI (which is from me) which loads the
> texts from database once on application startup.
>
> Now in my app I'm building an admin panel where one can edit the texts.
> After the admin finishes editing, he currently needs to restart the whole
> apache to load the new texts into catalyst or has to wait until the apache
> clients are killed after time (if running under mod_perl). This may be ok
> for develping but when running in production with several other website on
> the same apache, this is not a good idea.
>
> I thought there may be a possibility to restart only the catalyst
> application (like the built-in server does), but I don't think this is
> possible with apache. So the solution would be to set a "lexicon last
> modified" date somewhere and update this every time the texts have changed
> (which will not be often). The app could then check at each (or each N
> requests?) if the date has changed and reload the data.
>
> Would this be a good scenario and where exactly could this checking be done?
>
Can you use catalyst::plugin::cache as the backend for the lexicon?
Then refreshing the texts involves clearing the cache, and updates are
transparent.
- Chris
More information about the Catalyst
mailing list