if it was possible, to add some statistics to the
mod_cache, to measure the size of the cache, how well
it is being used, as squid has its own
What I did in my "private fork" was to have stats and storage providers.
A cache stat provider provides only a single function:
apr_status_t (*update_stats)(request_rec *r, int status);
where status is a "cache code." I had several codes, but just 1 = hit
and 0 = miss may be good enough.
A cache storage basicall has a function that gets called after the
object is stored. Mine is specific to disk (as I scrapped mem in mine):
typedef struct {
const char *key;
const char *meta;
const char *data;
apr_size_t meta_size;
apr_size_t data_size;
} cache_store_t;
apr_status_t (*post_store)(request_rec *r, url_cache_store_t
Then one could store storage stats in mysql, sqlite, db, whatever.
Both used mod_status optional hook to report stats.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies