httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r999630 - in /httpd/httpd/trunk: CHANGES modules/cache/cache_storage.c modules/cache/mod_cache.c modules/cache/mod_cache.h
Date Tue, 21 Sep 2010 20:43:44 GMT
Author: minfrin
Date: Tue Sep 21 20:43:44 2010
New Revision: 999630

URL: http://svn.apache.org/viewvc?rev=999630&view=rev
Log:
mod_cache: Give the cache provider the opportunity to choose to cache
or not cache based on the buckets present in the brigade, such as the
presence of a FILE bucket.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/cache/cache_storage.c
    httpd/httpd/trunk/modules/cache/mod_cache.c
    httpd/httpd/trunk/modules/cache/mod_cache.h

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=999630&r1=999629&r2=999630&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Sep 21 20:43:44 2010
@@ -2,6 +2,11 @@
 
 Changes with Apache 2.3.9
 
+  *) mod_cache: Give the cache provider the opportunity to choose to cache
+     or not cache based on the buckets present in the brigade, such as the
+     presence of a FILE bucket.
+     [Graham Leggett]
+
   *) mod_authz_core: Allow authz providers to check args while reading the
      config and allow to cache parsed args. [Stefan Fritsch]
 

Modified: httpd/httpd/trunk/modules/cache/cache_storage.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_storage.c?rev=999630&r1=999629&r2=999630&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_storage.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_storage.c Tue Sep 21 20:43:44 2010
@@ -66,7 +66,7 @@ int cache_remove_url(cache_request_rec *
  * decide whether or not it wants to cache this particular entity.
  * If the size is unknown, a size of -1 should be set.
  */
-int cache_create_entity(request_rec *r, apr_off_t size)
+int cache_create_entity(request_rec *r, apr_off_t size, apr_bucket_brigade *in)
 {
     cache_provider_list *list;
     cache_handle_t *h = apr_pcalloc(r->pool, sizeof(cache_handle_t));
@@ -86,7 +86,7 @@ int cache_create_entity(request_rec *r, 
     list = cache->providers;
     /* for each specified cache type, delete the URL */
     while (list) {
-        switch (rv = list->provider->create_entity(h, r, key, size)) {
+        switch (rv = list->provider->create_entity(h, r, key, size, in)) {
         case OK: {
             cache->handle = h;
             cache->provider = list->provider;

Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=999630&r1=999629&r2=999630&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Tue Sep 21 20:43:44 2010
@@ -1004,7 +1004,7 @@ static int cache_save_filter(ap_filter_t
 
     /* no cache handle, create a new entity only for non-HEAD requests */
     if (!cache->handle && !r->header_only) {
-        rv = cache_create_entity(r, size);
+        rv = cache_create_entity(r, size, in);
         info = apr_pcalloc(r->pool, sizeof(cache_info));
         /* We only set info->status upon the initial creation. */
         info->status = r->status;

Modified: httpd/httpd/trunk/modules/cache/mod_cache.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.h?rev=999630&r1=999629&r2=999630&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.h (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.h Tue Sep 21 20:43:44 2010
@@ -236,7 +236,7 @@ typedef struct {
     apr_status_t (*recall_headers) (cache_handle_t *h, request_rec *r);
     apr_status_t (*recall_body) (cache_handle_t *h, apr_pool_t *p, apr_bucket_brigade *bb);
     int (*create_entity) (cache_handle_t *h, request_rec *r,
-                           const char *urlkey, apr_off_t len);
+                           const char *urlkey, apr_off_t len, apr_bucket_brigade *bb);
     int (*open_entity) (cache_handle_t *h, request_rec *r,
                            const char *urlkey);
     int (*remove_url) (cache_handle_t *h, apr_pool_t *p);
@@ -388,7 +388,7 @@ CACHE_DECLARE(apr_table_t *)ap_cache_cac
  */
 #define MOD_CACHE_REQUEST_REC "mod_cache_request_rec"
 int cache_remove_url(cache_request_rec *cache, apr_pool_t *p);
-int cache_create_entity(request_rec *r, apr_off_t size);
+int cache_create_entity(request_rec *r, apr_off_t size, apr_bucket_brigade *in);
 int cache_select(request_rec *r);
 apr_status_t cache_generate_key_default( request_rec *r, apr_pool_t*p, char**key );
 



Mime
View raw message