summaryrefslogtreecommitdiff
path: root/ext/soap/php_soap.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-04-19 10:48:54 +0000
committerDmitry Stogov <dmitry@php.net>2006-04-19 10:48:54 +0000
commit68906dbe62b438e4d96d9b602ac35861dcb88637 (patch)
tree96473e6b5bfb76e2af113f98a2f3a005eff017bf /ext/soap/php_soap.h
parent9ea8d8dbf61e87291f028ddec65a03d991ba6a22 (diff)
downloadphp-git-68906dbe62b438e4d96d9b602ac35861dcb88637.tar.gz
Cleaned up Andrei's patch for caching WSDL in process memory, added TTL and LIMIT for memory cache.
Memory cache is disblead by fefault because it is experemental and isn't tested enough. It can be enabled whit configuartion directive "soap.wsdl_cache = WSDL_CACHE_MEMORY" or "soap.wsdl_cache = WSDL_CACHE_BOTH" or derectly in SoapClent/SoapServer constructor: $ws = new SoapClient($wsdl, array("cache_wsdl"=>WSDL_CACHE_BOTH)) Disk and memory caches use the same TTL value - "soap.wsdl_cache_ttl". Configuration directive "soap.wsdl_cache_limit" restricts the number of cached wsdl files in memory. Adding new files into full memory cache will delete oldest files from it. Note that, each PHP process or thread uses it's own memory cache.
Diffstat (limited to 'ext/soap/php_soap.h')
-rw-r--r--ext/soap/php_soap.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h
index a0a7bf6dde..d6988cd0f0 100644
--- a/ext/soap/php_soap.h
+++ b/ext/soap/php_soap.h
@@ -158,6 +158,11 @@ struct _soapService {
#define SOAP_SINGLE_ELEMENT_ARRAYS (1<<0)
#define SOAP_WAIT_ONE_WAY_CALLS (2<<0)
+#define WSDL_CACHE_NONE 0x0
+#define WSDL_CACHE_DISK 0x1
+#define WSDL_CACHE_MEMORY 0x2
+#define WSDL_CACHE_BOTH 0x3
+
ZEND_BEGIN_MODULE_GLOBALS(soap)
HashTable defEncNs; /* mapping of default namespaces to prefixes */
HashTable defEnc;
@@ -169,9 +174,11 @@ ZEND_BEGIN_MODULE_GLOBALS(soap)
zend_bool use_soap_error_handler;
char* error_code;
zval* error_object;
- zend_bool cache_enabled;
+ long cache;
char* cache_dir;
long cache_ttl;
+ long cache_limit;
+ HashTable *mem_cache;
xmlCharEncodingHandlerPtr encoding;
HashTable *class_map;
int features;