File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,14 @@ function __construct($options=array()) {
28
28
if ( !extension_loaded ('memcache ' ) ) {
29
29
throw_exception (L ('_NOT_SUPPERT_ ' ).':memcache ' );
30
30
}
31
- if ( empty ( $ options )) {
32
- $ options = array (
33
- 'host ' => C ('MEMCACHE_HOST ' ) ? C ('MEMCACHE_HOST ' ) : '127.0.0.1 ' ,
34
- 'port ' => C ('MEMCACHE_PORT ' ) ? C ('MEMCACHE_PORT ' ) : 11211 ,
35
- 'timeout ' => C ('DATA_CACHE_TIMEOUT ' ) ? C ('DATA_CACHE_TIMEOUT ' ) : false ,
36
- 'persistent ' => false ,
37
- );
38
- }
31
+
32
+ $ options = array_merge ( array (
33
+ 'host ' => C ('MEMCACHE_HOST ' ) ? C ('MEMCACHE_HOST ' ) : '127.0.0.1 ' ,
34
+ 'port ' => C ('MEMCACHE_PORT ' ) ? C ('MEMCACHE_PORT ' ) : 11211 ,
35
+ 'timeout ' => C ('DATA_CACHE_TIMEOUT ' ) ? C ('DATA_CACHE_TIMEOUT ' ) : false ,
36
+ 'persistent ' => false ,
37
+ ), $ options );
38
+
39
39
$ this ->options = $ options ;
40
40
$ this ->options ['expire ' ] = isset ($ options ['expire ' ])? $ options ['expire ' ] : C ('DATA_CACHE_TIME ' );
41
41
$ this ->options ['prefix ' ] = isset ($ options ['prefix ' ])? $ options ['prefix ' ] : C ('DATA_CACHE_PREFIX ' );
You can’t perform that action at this time.
0 commit comments