Update memcache conditon matching
Add an additional OR conditional for memcache usage. If you use the DSN as listed at https://github.com/shish/shimmie2/wiki/Performance#software-cache the memcache section will never run because it is looking only for DSNs with 'memcached' causing an exception to be thrown on the first access as the cache is never setup.
This commit is contained in:
@ -144,7 +144,7 @@ class Cache
|
|||||||
$matches = [];
|
$matches = [];
|
||||||
$c = null;
|
$c = null;
|
||||||
if ($dsn && preg_match("#(.*)://(.*)#", $dsn, $matches) && !isset($_GET['DISABLE_CACHE'])) {
|
if ($dsn && preg_match("#(.*)://(.*)#", $dsn, $matches) && !isset($_GET['DISABLE_CACHE'])) {
|
||||||
if ($matches[1] == "memcached") {
|
if ($matches[1] == "memcached" || $matches[1] == "memcache") {
|
||||||
$c = new MemcachedCache($matches[2]);
|
$c = new MemcachedCache($matches[2]);
|
||||||
} elseif ($matches[1] == "apc") {
|
} elseif ($matches[1] == "apc") {
|
||||||
$c = new APCCache($matches[2]);
|
$c = new APCCache($matches[2]);
|
||||||
|
Reference in New Issue
Block a user