Make object cache configurable via the admin UI

This commit is contained in:
Kijin Sung 2016-02-11 13:32:55 +09:00
parent 225f02cac2
commit f3d3122787
10 changed files with 113 additions and 6 deletions

View file

@ -21,9 +21,9 @@ class CacheRedis extends CacheBase
* @param string $url url of Redis
* @return CacheRedis instance of CacheRedis
*/
function getInstance($url)
function getInstance($url, $force_new_instance = false)
{
if(!$GLOBALS['__CacheRedis__'])
if(!$GLOBALS['__CacheRedis__'] || $force_new_instance)
{
$GLOBALS['__CacheRedis__'] = new CacheRedis($url);
}