[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: AuthenDBI with caching
From:       Edmund Mergl <E.Mergl () BAWUE ! DE>
Date:       1998-03-28 20:15:05
[Download RAW message or body]

Jason Bodnar wrote:
>
> I use AuthenDBI on several of our sites. Fortunately, the areas it's used
> in get alot of traffic. Unfortunately, this means our database takes alot
> of pounding. So, in order to reduce the load on our database, I've modified
> AuthenDBI so it will use an optional cache.
>
> Right now, the cache is per process. In the future I'll look at using
> Shareable so all processes will access the same cache.
>
> Below is the diff between my hacked AuthenDBI with caching and AuthenDBI
> 0.78. Attached is the full version of my hacked AuthenDBI with caching.
>
> To enable caching you can set the following parameters:
>
> PerlSetVar Auth_DBI_cache_size  500 # Number of users to cache (required
> for caching right now, I should make this optional)
> PerlSetVar Auth_DBI_cache_time  3600 # Number of seconds to use a cache
> before starting a new one (optional)
>
> The cache is stored in an IxHash so you'll need that to use this. When
> cache_size is reached the olded user in the cache is shifted off. When
> cache_time seconds have elapsed between the time the cache was created and
> the current time, a new cache is created.
>
> I think that's all there is to it. If any of you have the need for
> something like this please try it out and send me feedback. And, if it's
> okay with Edmund I think it would be great if it could be rolled into the
> standard AuthenDBI.


I will add it to the next release.

thanks
Edmund
--
Edmund Mergl          mailto:E.Mergl@bawue.de
Im Haldenhau 9        http://www.bawue.de/~mergl
70565 Stuttgart       fon: +49 711 747503
Germany               gsm: +49 171 2645325

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic