I am trying to find the most efficient way to send a piece of information from an external program to apache/modperl such that each process will have the value when next checked. The idea is to have an in memory variable that changes infrequently, but needs to be checked every time a script that uses it is run. The application is to keep frequently used database data cached in modperl, and to send a cache dirty revision number when something which might be cached is modified. I know one can use a file, and check the file contents each time, but this seems extremely expensive considering my very small script does not access any other files (I am ignoring the standard overhead for modperl checking if the script has changed, etc). I could also keep the revision number in the DB, but the DB overhead seems an even bigger waste. Note that using a simple dirty flag does not suffice since each process needs to keep track of whether it is up to date, so it needs to be a value.


Is there a way to pass a value into apache such that each modperl process then has access to it? Note that when a new value is passed before a process had a chance to check the previous one, it is OK for the previous one to never have been seen.

I am using Apache::Registry.

Any ideas?

-Ethan


-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to