通知 mod_perl 应用程序 apache 服务器已重新启动

Inform mod_perl application that the apache server has restarted

通知 mod_perl 应用程序 运行 最近重新启动的 apache 网络服务器的最佳方法是什么(假设有一个)?

我问是因为当我重新启动服务器时我想清除memcached,但是在这种情况下,我需要通知应用程序memcached已重置以便应用程序可以重新初始化数据。

您可以将这种逻辑放在启动文件中。此文件将在 Apache(重新)启动时执行。在您的 Apache 配置中:

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

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