[CDBI] Use with mod_perl caching question
eric.berg at lehman.com
Thu Dec 13 16:50:17 GMT 2007
My app uses cdbi for data acces, and CGI::App running in a mod_perl
environment. Basically, just my CGI running under Apache::Registry.
My application runs reports and persists status to a Sybase database.
We've recently implemented an AJAX status update for the status web page
that refreshes every 5 seconds.
The problem that I'm having is that my cdbi mods in some of the apache
instances are returning stale data in response to these requests.
What I'm doing is something like this:
@status_list = My::Status->search(environment => 'PROD');
and then I tried
@status_list = My::Status->retrieve_from_sql("environment='PROD'");
but neither of these consistently return correct data from the db.
Looks to me like they just return from their local caches.
My question is, how do I force cdbi to always go to the db for specific
I can see that if there were only one process updating the database,
that the cached version of my modules would always have the correct
data, but I run in a mod_perl environment with multiple child processes,
and also have external processes that update the db -- setting status,
as a prime example.
So, any thoughts, folks?
Eric D. Berg
> Fixed Income Research
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this communication (including any attachments) is not intended or written to be used and cannot be used for the purpose of (i) avoiding U.S. tax related penalties or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.
More information about the ClassDBI