Hi all,

Given the number of MMN bumps that mod_cache is generating, I'd like to bump the MMN just once for the following changes that need to be made (happy to bump the MMN for each one as well, don't know how people feel):

- Remove the MOD_CACHE_REQUEST_REC hack.

The mod_cache filter context structure specific to the mod_cache parent module, cache_request_rec, was not available to any of the API functions, and so as a kludge workaround to not changing the API, the structure was attached to a memory pool and passed around under the counter.

This hack needs to be removed, and the structure passed as a simple parameter like all the other structures.

- Move all of the following functions to cache_util.h, as none of these are public outside of the parent mod_cache, nor do they need to be namespaced either:

CACHE_DECLARE(int) ap_cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
                                            request_rec *r);
CACHE_DECLARE(apr_status_t) ap_cache_try_lock(cache_server_conf *conf,
        cache_request_rec *cache, request_rec *r, char *key);
CACHE_DECLARE(apr_status_t) ap_cache_remove_lock(cache_server_conf *conf,
        cache_request_rec *cache, request_rec *r, char *key,
        apr_bucket_brigade *bb);
CACHE_DECLARE(void) ap_cache_accept_headers(cache_handle_t *h, request_rec *r,
                                            int preserve_orig);
CACHE_DECLARE(cache_provider_list *)ap_cache_get_providers(request_rec *r, cache_server_conf *conf, apr_uri_t uri);

- The following function is deprecated already, remove it:

CACHE_DECLARE(apr_table_t *)ap_cache_cacheable_hdrs_out(apr_pool_t *pool,
                                                        apr_table_t *t,
                                                        server_rec *s);

- Resolve the TODO and the FIXME documented in mod_cache.h:

/* XXX TODO On the next structure change/MMN bump,
 * count must become an apr_off_t, representing
 * the potential size of disk cached objects.
 * Then dig for
 * "XXX Bad Temporary Cast - see cache_object_t notes"
 */
typedef struct cache_object cache_object_t;
struct cache_object {
    const char *key;
    cache_object_t *next;
    cache_info info;
/* Opaque portion (specific to the implementation) of the cache object */
    void *vobj;
    /* FIXME: These are only required for mod_mem_cache. */
apr_size_t count; /* Number of body bytes written to the cache so far */
    int complete;
apr_uint32_t refcount; /* refcount and bit flag to cleanup object */
};

- Move the following structures private to the mod_cache parent module to cache_util.h:

cache_server_conf
cache_enable
cache_disable

After this, I suspect the big cache API cleanup should be complete.

Regards,
Graham
--

Reply via email to