httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergio Leonardi" <sleona...@etnoteam.it>
Subject RE: mod-cache-requestor plan
Date Fri, 22 Jul 2005 08:56:49 GMT
The basic approach is ok for me, I just make a note.
I think that mod_cache should put each cached page in the queue at the time
its entry in the cache is created (or when its expire time has been
changed), setting the proper regeneration time in the queue (e.g.
regeneration time = page expire time - time spent for last page generation).

In such a way there's no need to lookup for what's expiring, just sleep
until something needs to be regenerated.
Bye

	Sergio

-----Original Message-----
From: Parin Shah [mailto:parin.soc@gmail.com] 
Sent: venerdì 22 luglio 2005 8.02
To: dev@httpd.apache.org
Subject: Re: mod-cache-requestor plan

Thanks Ian, Graham and Sergio for your help. 

for past couple of days I am trying to figure out how our
mod-cache-requester should spawn thread (or set of threads).
Currently, I am considering following option. please let me know what
you think about this approach.

- mod-cache-requester would be a sub-module in mod-cache as Graham had
suggested once.

- it would look similar to mod-mem-cache. it would have provider
(mod-cache-requester-provider, for lack of any better word for now)
registered.

- mod-cache (cache_url_handler to be precise)  will do lookup for this
provider and will use this provider's methods to push any page which
is soon-to-be-expired in the priority queue.

- in the post config of the mod-cache-requester our pqueue would be
initialized along with mutexes and other stuff.

- now, we would create new thread (or set of threads) in the post
config which would basically contain an infinite loop. it (or they)
will keep checking pqueue and would make sub requests accordingly.

Does this make sense? 

If this approach is correct then I have some questions regarding
thread vs process implementation. I would start discussing it once we
have main architecture in place.

Thanks,
Parin.

On 7/20/05, Graham Leggett <minfrin@sharp.fm> wrote:
> Parin Shah wrote:
> 
> > 2. how mod-cache-requester can generate the sub request just to reload
> > the content in the cache.
> 
> Look inside mod_include - it uses subrequests to be able to embed pages
> within other pages.
> 
> Regards,
> Graham
> --
>


Mime
View raw message