]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Optimise the configuration structures for mod_cache.
authorGraham Leggett <minfrin@apache.org>
Sun, 17 Oct 2010 16:52:16 +0000 (16:52 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 17 Oct 2010 16:52:16 +0000 (16:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023526 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/cache_util.h

index 68d7d66823e279c7db2820176b83526c8d13e2af..18ef76e7b1a28fcd95e566099616aca093333598 100644 (file)
@@ -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. */