17 || !array_key_exists($userId, self::$instance)
22 if (self::useInMemoryState())
24 self::$instance[$userId] =
new InMemory($userId, $loader);
26 elseif ($loader->getTotalCounters() >= Counter::getGlobalLimit())
29 self::$instance[$userId] =
new InDatabase($userId, $loader);
34 self::$instance[$userId] =
new InMemory($userId, $loader);
38 return self::$instance[$userId];