Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
3944b842
Commit
3944b842
authored
Dec 09, 2016
by
Victor Dubiniuk
Browse files
Set options, then add servers
parent
08da9a8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/private/Memcache/Memcached.php
View file @
3944b842
...
...
@@ -45,16 +45,6 @@ class Memcached extends Cache implements IMemcache {
parent
::
__construct
(
$prefix
);
if
(
is_null
(
self
::
$cache
))
{
self
::
$cache
=
new
\
Memcached
();
$servers
=
\
OC
::
$server
->
getSystemConfig
()
->
getValue
(
'memcached_servers'
);
if
(
!
$servers
)
{
$server
=
\
OC
::
$server
->
getSystemConfig
()
->
getValue
(
'memcached_server'
);
if
(
$server
)
{
$servers
=
[
$server
];
}
else
{
$servers
=
[[
'localhost'
,
11211
]];
}
}
self
::
$cache
->
addServers
(
$servers
);
$defaultOptions
=
[
\
Memcached
::
OPT_CONNECT_TIMEOUT
=>
50
,
...
...
@@ -84,6 +74,17 @@ class Memcached extends Cache implements IMemcache {
}
else
{
throw
new
HintException
(
"Expected 'memcached_options' config to be an array, got
$options
"
);
}
$servers
=
\
OC
::
$server
->
getSystemConfig
()
->
getValue
(
'memcached_servers'
);
if
(
!
$servers
)
{
$server
=
\
OC
::
$server
->
getSystemConfig
()
->
getValue
(
'memcached_server'
);
if
(
$server
)
{
$servers
=
[
$server
];
}
else
{
$servers
=
[[
'localhost'
,
11211
]];
}
}
self
::
$cache
->
addServers
(
$servers
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment