From: Graham Leggett Date: Sun, 17 Oct 2010 16:52:16 +0000 (+0000) Subject: Optimise the configuration structures for mod_cache. X-Git-Tag: 2.3.9~288 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4994a28f2f92783929e3953a234b0266984237c1;p=thirdparty%2Fapache%2Fhttpd.git Optimise the configuration structures for mod_cache. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023526 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/cache_util.h b/modules/cache/cache_util.h index 68d7d66823e..18ef76e7b1a 100644 --- a/modules/cache/cache_util.h +++ b/modules/cache/cache_util.h @@ -119,75 +119,75 @@ struct cache_disable { typedef struct { apr_array_header_t *cacheenable; /* URLs to cache */ apr_array_header_t *cachedisable; /* URLs not to cache */ - /** ignore client's requests for uncached responses */ - int ignorecachecontrol; - int ignorecachecontrol_set; - /* flag if CacheIgnoreHeader has been set */ - #define CACHE_IGNORE_HEADERS_SET 1 - #define CACHE_IGNORE_HEADERS_UNSET 0 - int ignore_headers_set; /** store the headers that should not be stored in the cache */ apr_array_header_t *ignore_headers; - /** ignore query-string when caching */ - int ignorequerystring; - int ignorequerystring_set; - /* flag if CacheIgnoreURLSessionIdentifiers has been set */ - #define CACHE_IGNORE_SESSION_ID_SET 1 - #define CACHE_IGNORE_SESSION_ID_UNSET 0 - int ignore_session_id_set; /** store the identifiers that should not be used for key calculation */ apr_array_header_t *ignore_session_id; - /* thundering herd lock */ - int lock; - int lock_set; const char *lockpath; - int lockpath_set; - int lockmaxage_set; apr_time_t lockmaxage; - /** run within the quick handler */ - int quick; - int quick_set; - int x_cache; - int x_cache_set; - int x_cache_detail; - int x_cache_detail_set; apr_uri_t *base_uri; - int base_uri_set; + /** ignore client's requests for uncached responses */ + int ignorecachecontrol:1; + /** ignore query-string when caching */ + int ignorequerystring:1; + /** run within the quick handler */ + int quick:1; + /* thundering herd lock */ + int lock:1; + int x_cache:1; + int x_cache_detail:1; + /* flag if CacheIgnoreHeader has been set */ + #define CACHE_IGNORE_HEADERS_SET 1 + #define CACHE_IGNORE_HEADERS_UNSET 0 + int ignore_headers_set:1; + /* flag if CacheIgnoreURLSessionIdentifiers has been set */ + #define CACHE_IGNORE_SESSION_ID_SET 1 + #define CACHE_IGNORE_SESSION_ID_UNSET 0 + int ignore_session_id_set:1; + int base_uri_set:1; + int ignorecachecontrol_set:1; + int ignorequerystring_set:1; + int quick_set:1; + int lock_set:1; + int lockpath_set:1; + int lockmaxage_set:1; + int x_cache_set:1; + int x_cache_detail_set:1; } cache_server_conf; typedef struct { - /** ignore the last-modified header when deciding to cache this request */ - int no_last_mod_ignore_set; - int no_last_mod_ignore; - /** ignore expiration date from server */ - int store_expired; - int store_expired_set; - /** ignore Cache-Control: private header from server */ - int store_private; - int store_private_set; - /** ignore Cache-Control: no-store header from client or server */ - int store_nostore; - int store_nostore_set; /* Minimum time to keep cached files in msecs */ apr_time_t minex; - int minex_set; /* Maximum time to keep cached files in msecs */ apr_time_t maxex; - int maxex_set; /* default time to keep cached file in msecs */ - int defex_set; apr_time_t defex; /* factor for estimating expires date */ double factor; - int factor_set; /* set X-Cache headers */ - int x_cache; - int x_cache_set; - int x_cache_detail; - int x_cache_detail_set; + int x_cache:1; + int x_cache_detail:1; /* serve stale on error */ - int stale_on_error; - int stale_on_error_set; + int stale_on_error:1; + /** ignore the last-modified header when deciding to cache this request */ + int no_last_mod_ignore:1; + /** ignore expiration date from server */ + int store_expired:1; + /** ignore Cache-Control: private header from server */ + int store_private:1; + /** ignore Cache-Control: no-store header from client or server */ + int store_nostore:1; + int minex_set:1; + int maxex_set:1; + int defex_set:1; + int factor_set:1; + int x_cache_set:1; + int x_cache_detail_set:1; + int stale_on_error_set:1; + int no_last_mod_ignore_set:1; + int store_expired_set:1; + int store_private_set:1; + int store_nostore_set:1; } cache_dir_conf; /* A linked-list of authn providers. */