You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Akins <ba...@web.turner.com> on 2006/02/27 21:29:07 UTC

[PATCH] mod_cache storage notify and object_info

I'm away from my build/test environment, but this is mostly to plant an 
idea.

Basically it does this:

Upon successful storage of an object, it call the optional 
ap_cache_storage_notify.  a module, if it implements this function, 
could then use the ap_cache_info function to get info about the cached 
object.

Example (omitting error checking):

in mod_foo:

apr_status_t foo_storage_notify(request_rec *r) {
     char *data;
     apr_time_t expires;

     ap_cache_info(r, AP_CACHE_INFO_EXPIRES, &expires);
     ap_cache_info(r, AP_CACHE_INFO_DATA, &data);

     /*do something cool with this, like log in database...*/	
	
}

-- 
Brian Akins
Lead Systems Engineer
CNN Internet Technologies