httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: Visiting mod_authn_cache
Date Mon, 02 Nov 2009 09:34:08 GMT
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
--

Mime
View raw message