Graham Leggett wrote: > Issac Goldstand wrote: > > >> I've actually gotten everything working except for the timeout thing. >> I'm probably missing something obvious in C, but this is what I'm doing... >> >> I've got a timeout period set as a apr_short_interval_time_t, a >> timestamp on each cache entry set as an apr_time_t, and I populate the >> latter with apr_time_now() when I add the cache entry and compare if >> (cache timestamp + the timeout < apr_time_now()) then use the cached >> credentials, otherwise delete the old cache entry. >> >> The odd thing is that I *never* get the else to run. Ever. >> > > (Not had time to look at any code yet, but this leaps to mind) > > Have you had a look at the mod_socache provider in httpd-trunk? The > provider gives you a pluggable caching mechanism, and gives you timeout > and max-age functionality for free. > > I would be strongly for reusing the existing modular socache code rather > than inventing yet-another-cache in the tree. > > (Apologies if socache is what you're using already) > > Regards, > Graham > -- > Nope, it's not what I was using. I wanted to keep it 2.2.x compatible since I need this module in production, although I completely agree with the point.
Issac
