简体   繁体   中英

Inform mod_perl application that the apache server has restarted

What's the best way (assuming there is one) to inform a mod_perl application that the apache web-server it's running under recently restarted?

I ask because when I restart the server I'd like to clear memcached, however in that case, I need to inform the application that memcached has reset so that the application can initialise the data again.

You can put this sort of logic in a startup file. This file will be executed on Apache (re)start. In your Apache config:

 PerlPostConfigRequire /home/httpd/perl/lib/startup.pl

More info at http://perl.apache.org/docs/2.0/user/handlers/server.html#Startup_File

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM