File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ class Extended_Cache_Backend_Redis extends Zend_Cache_Backend implements Zend_Ca
61
61
const DEFAULT_PORT = 6379 ;
62
62
const DEFAULT_PERSISTENT = true ;
63
63
const DEFAULT_DBINDEX = 0 ;
64
+ const DEFAULT_AUTH = false ;
65
+ const DEFAULT_AUTH_PASSWORD = null ;
64
66
65
67
protected $ _options = array (
66
68
'servers ' => array (
@@ -72,6 +74,8 @@ class Extended_Cache_Backend_Redis extends Zend_Cache_Backend implements Zend_Ca
72
74
),
73
75
),
74
76
'key_prefix ' => '' ,
77
+ 'auth ' => self ::DEFAULT_AUTH ,
78
+ 'password ' => self ::DEFAULT_AUTH_PASSWORD ,
75
79
);
76
80
77
81
/**
@@ -118,6 +122,10 @@ public function __construct(array $options = array())
118
122
else
119
123
$ this ->_redis = null ;
120
124
}
125
+
126
+ if ($ this ->_redis && $ this ->_options ['auth ' ]) {
127
+ $ this ->_redis ->auth ($ this ->_options ['password ' ]);
128
+ }
121
129
}
122
130
123
131
/**
You can’t perform that action at this time.
0 commit comments