Changeset 64 for eaccelerator/trunk/content.c
- Timestamp:
- 04/26/05 16:48:00 (4 years ago)
- Files:
-
- eaccelerator/trunk/content.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/trunk/content.c
r21 r64 3 3 | eAccelerator project | 4 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 2004 eAccelerator|6 | http://eaccelerator. sourceforge.net|5 | Copyright (c) 2004 - 2005 eAccelerator | 6 | http://eaccelerator.net | 7 7 +----------------------------------------------------------------------+ 8 8 | This program is free software; you can redistribute it and/or | … … 33 33 #ifdef WITH_EACCELERATOR_CONTENT_CACHING 34 34 35 #include "cache.h" 36 #include "content.h" 35 37 #include "SAPI.h" 36 38 37 39 #define EACCELERATOR_COMPRESS_MIN 128 38 40 41 eaccelerator_cache_place eaccelerator_content_cache_place = eaccelerator_shm_and_disk; 42 39 43 static int (*eaccelerator_old_header_handler)(sapi_header_struct *sapi_header, sapi_headers_struct *sapi_headers TSRMLS_DC); 44 45 PHP_INI_MH (eaccelerator_OnUpdateContentCachePlace) 46 { 47 if (strncasecmp ("shm_and_disk", new_value, 48 sizeof ("shm_and_disk")) == 0) 49 { 50 eaccelerator_content_cache_place = eaccelerator_shm_and_disk; 51 } 52 else if (strncasecmp ("shm", new_value, 53 sizeof ("shm")) == 0) 54 { 55 eaccelerator_content_cache_place = eaccelerator_shm; 56 } 57 else if (strncasecmp ("shm_only", new_value, 58 sizeof ("shm_only")) == 0) 59 { 60 eaccelerator_content_cache_place = eaccelerator_shm_only; 61 } 62 else if (strncasecmp ("disk_only", new_value, 63 sizeof ("disk_only")) == 0) 64 { 65 eaccelerator_content_cache_place = eaccelerator_disk_only; 66 } 67 else if (strncasecmp ("none", new_value, 68 sizeof ("none")) == 0) 69 { 70 eaccelerator_content_cache_place = eaccelerator_none; 71 } 72 return SUCCESS; 73 } 40 74 41 75 static int eaccelerator_check_compression(sapi_header_struct *sapi_header TSRMLS_DC) { … … 131 165 add_next_index_stringl(headers, s, h->header_len+1, 0); 132 166 p = p->next; 167 efree(s); 133 168 } 134 169 add_assoc_zval(&cache_array, "headers", headers);