ASF Bugzilla – Attachment 18861 Details for
Bug 39380
mod_disk_cache eats memory, has no LFS support, etc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mod_disk_cache LFS-aware config
mod_disk_cache-lfsconfig.patch (text/plain), 3.83 KB, created by
Niklas Edmundsson
on 2006-09-14 09:01:07 UTC
(
hide
)
Description:
mod_disk_cache LFS-aware config
Filename:
MIME Type:
Creator:
Niklas Edmundsson
Created:
2006-09-14 09:01:07 UTC
Size:
3.83 KB
patch
obsolete
>Index: mod_disk_cache.c >=================================================================== >--- mod_disk_cache.c (revision 416365) >+++ mod_disk_cache.c (working copy) >@@ -334,14 +334,14 @@ static int create_entity(cache_handle_t > if (len > conf->maxfs) { > ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > "disk_cache: URL %s failed the size check " >- "(%" APR_OFF_T_FMT " > %" APR_SIZE_T_FMT ")", >+ "(%" APR_OFF_T_FMT " > %" APR_OFF_T_FMT ")", > key, len, conf->maxfs); > return DECLINED; > } > if (len >= 0 && len < conf->minfs) { > ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > "disk_cache: URL %s failed the size check " >- "(%" APR_OFF_T_FMT " < %" APR_SIZE_T_FMT ")", >+ "(%" APR_OFF_T_FMT " < %" APR_OFF_T_FMT ")", > key, len, conf->minfs); > return DECLINED; > } >@@ -1026,7 +1026,7 @@ static apr_status_t store_body(cache_han > if (dobj->file_size > conf->maxfs) { > ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > "disk_cache: URL %s failed the size check " >- "(%" APR_OFF_T_FMT ">%" APR_SIZE_T_FMT ")", >+ "(%" APR_OFF_T_FMT ">%" APR_OFF_T_FMT ")", > h->cache_obj->key, dobj->file_size, conf->maxfs); > /* Remove the intermediate cache file and return non-APR_SUCCESS */ > file_cache_errorcleanup(dobj, r); >@@ -1050,7 +1050,7 @@ static apr_status_t store_body(cache_han > if (dobj->file_size < conf->minfs) { > ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > "disk_cache: URL %s failed the size check " >- "(%" APR_OFF_T_FMT "<%" APR_SIZE_T_FMT ")", >+ "(%" APR_OFF_T_FMT "<%" APR_OFF_T_FMT ")", > h->cache_obj->key, dobj->file_size, conf->minfs); > /* Remove the intermediate cache file and return non-APR_SUCCESS */ > file_cache_errorcleanup(dobj, r); >@@ -1137,15 +1137,25 @@ static const char > { > disk_cache_conf *conf = ap_get_module_config(parms->server->module_config, > &disk_cache_module); >- conf->minfs = atoi(arg); >+ >+ if (apr_strtoff(&conf->minfs, arg, NULL, 0) != APR_SUCCESS || >+ conf->minfs < 0) >+ { >+ return "CacheMinFileSize argument must be a non-negative integer representing the min size of a file to cache in bytes."; >+ } > return NULL; > } >+ > static const char > *set_cache_maxfs(cmd_parms *parms, void *in_struct_ptr, const char *arg) > { > disk_cache_conf *conf = ap_get_module_config(parms->server->module_config, > &disk_cache_module); >- conf->maxfs = atoi(arg); >+ if (apr_strtoff(&conf->maxfs, arg, NULL, 0) != APR_SUCCESS || >+ conf->maxfs < 0) >+ { >+ return "CacheMaxFileSize argument must be a non-negative integer representing the max size of a file to cache in bytes."; >+ } > return NULL; > } > >Index: mod_disk_cache.h >=================================================================== >--- mod_disk_cache.h (revision 416365) >+++ mod_disk_cache.h (working copy) >@@ -88,8 +88,8 @@ typedef struct { > apr_size_t cache_root_len; > int dirlevels; /* Number of levels of subdirectories */ > int dirlength; /* Length of subdirectory names */ >- apr_size_t minfs; /* minumum file size for cached files */ >- apr_size_t maxfs; /* maximum file size for cached files */ >+ apr_off_t minfs; /* minimum file size for cached files */ >+ apr_off_t maxfs; /* maximum file size for cached files */ > } disk_cache_conf; > > #endif /*MOD_DISK_CACHE_H*/
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 39380
:
18152
|
18154
|
18155
|
18157
|
18158
|
18159
|
18860
| 18861 |
18916
|
18968
|
18969
|
18979
|
18980
|
19418
|
20558
|
21016
|
21519
|
21715
|
22127