Parin Shah wrote:

- In this case, what would be the criteria to determine which pages should be refreshed and which should be left out. intitially I thought that all the pages - those are about to expire and have been requested - should be refreshed. but, if we consider keeping non-popular but expensive pages in the cache, in that case houw would te mod-c-requester would make the decision?

The current backend cache modules use the CacheEnable directive to say "this backend is valid for this URL space".

In theory mod_cache_requester could use this directive to hook itself in. The cache is supposed to allow multiple backend modules the option to handle the request (for example, the mem cache might say "nope, too big for me" while the disk cache says "yep, can cache that file, let me handle it"), so requester would just add itself to the list - it would probably need to be first in the list.

If mod_cache_requester was in there, it could add that URL space to the list of URL spaces to be freshened on a periodic basis.

You may need an extra cache hook that says "give me all cached URLs under URL space XXX", not sure if such a thing exists at the moment.

Keep in mind the cache can store variants of the same URL (for example, the same page in different languages, or one compressed and another not compressed), which will have to be kept in mind while refreshing.

- considering that mod-cache-requester would be using some mod-cache's hooks to query the elements in the cache, would mod-cache-requester be still highly dependent on the platform (process vs threads)?

It would be dependant on whether threads or processes are present (or maybe both) rather than platform, which is a far simpler case to code for.

Something along the lines of "if (threads or both), create refresher thread, else if process only, create refresh process keeping in mind that refreshing mem cache won't work".

Regards,
Graham
--

Reply via email to