]> granicus.if.org Git - apache/commitdiff
We describe body lengths throughout apr in apr_off_t lengths. While we
authorWilliam A. Rowe Jr <wrowe@apache.org>
Sat, 3 Aug 2002 22:39:42 +0000 (22:39 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Sat, 3 Aug 2002 22:39:42 +0000 (22:39 +0000)
  all agree we won't ever cache an entity that huge in memory, the disk
  cache is another matter [e.g. if we cache an existing file.]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96302 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/cache_storage.c
modules/experimental/mod_cache.c
modules/experimental/mod_cache.h
modules/experimental/mod_disk_cache.c
modules/experimental/mod_mem_cache.c

index b4b0d77d39b551830cc7e1072ee1b168a9e133cb..aeef53419a55c44d04a90a861d2bb164756dd852 100644 (file)
@@ -108,7 +108,7 @@ int cache_remove_url(request_rec *r, const char *types, char *url)
  * 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, const char *types, char *url, apr_size_t size)
+int cache_create_entity(request_rec *r, const char *types, char *url, apr_off_t size)
 {
     cache_handle_t *h = apr_pcalloc(r->pool, sizeof(cache_handle_t));
     const char *next = types;
@@ -300,7 +300,7 @@ apr_status_t cache_generate_key_default( request_rec *r, apr_pool_t*p, char**key
 
 APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(cache, CACHE, int, create_entity, 
                                       (cache_handle_t *h, request_rec *r, const char *type, 
-                                      const char *urlkey, apr_size_t len),
+                                      const char *urlkey, apr_off_t len),
                                       (h, r, type,urlkey,len),DECLINED)
 APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(cache, CACHE, int, open_entity,  
                                       (cache_handle_t *h, request_rec *r, const char *type, 
index 26b4fab7a2f0270a9f9a6004cf3be83e90a55ea7..70d50e883a188faf6d16a881482bcd97be989d7e 100644 (file)
@@ -409,7 +409,7 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in)
     const char *cc_out = apr_table_get(r->headers_out, "Cache-Control");
     const char *exps, *lastmods, *dates, *etag;
     apr_time_t exp, date, lastmod, now;
-    apr_size_t size;
+    apr_off_t size;
     cache_info *info;
     void *sconf = r->server->module_config;
     cache_server_conf *conf =
index 870b60b144d8b97f39703eb437eaf150cf84a650..66fae17efb82ea8e8eacecddf09908489793df3b 100644 (file)
@@ -268,7 +268,7 @@ CACHE_DECLARE(const char *)ap_cache_tokstr(apr_pool_t *p, const char *list, cons
  * cache_storage.c
  */
 int cache_remove_url(request_rec *r, const char *types, char *url);
-int cache_create_entity(request_rec *r, const char *types, char *url, apr_size_t size);
+int cache_create_entity(request_rec *r, const char *types, char *url, apr_off_t size);
 int cache_remove_entity(request_rec *r, const char *types, cache_handle_t *h);
 int cache_select_url(request_rec *r, const char *types, char *url);
 apr_status_t cache_generate_key_default( request_rec *r, apr_pool_t*p, char**key );
@@ -310,7 +310,7 @@ apr_status_t cache_read_entity_body(cache_handle_t *h, apr_pool_t *p, apr_bucket
 
 APR_DECLARE_EXTERNAL_HOOK(cache, CACHE, int, create_entity, 
                           (cache_handle_t *h, request_rec *r, const char *type,
-                           const char *urlkey, apr_size_t len))
+                           const char *urlkey, apr_off_t len))
 APR_DECLARE_EXTERNAL_HOOK(cache, CACHE, int, open_entity,  
                           (cache_handle_t *h, request_rec *r, const char *type,
                            const char *urlkey))
index 38e5b448e8572ea01a988ca3f5c1c6312a16f263..e9e9bb9f9da3a859cac27813f23ddaa0a4b5917a 100644 (file)
@@ -312,7 +312,7 @@ static int file_cache_write_mydata(apr_file_t *fd , cache_handle_t *h, request_r
 static int create_entity(cache_handle_t *h, request_rec *r,
                          const char *type, 
                          const char *key, 
-                         apr_size_t len)
+                         apr_off_t len)
 { 
     disk_cache_conf *conf = ap_get_module_config(r->server->module_config, 
                                                  &disk_cache_module);
index f3f9c2bc2dfd9723153b44bde1a9a24b4b8dfa17..a2990ab58dede2394b767a6d3d8d7891ff21ef59 100644 (file)
@@ -431,7 +431,7 @@ static void *create_cache_config(apr_pool_t *p, server_rec *s)
 static int create_entity(cache_handle_t *h, request_rec *r,
                          const char *type, 
                          const char *key, 
-                         apr_size_t len) 
+                         apr_off_t len) 
 {
     cache_object_t *obj, *tmp_obj;
     mem_cache_object_t *mobj;