3 namespace Drupal\Core\KeyValueStore;
6 * Defines the key/value store factory for the memory backend.
8 class KeyValueMemoryFactory implements KeyValueFactoryInterface {
11 * An array of keyvalue collections that are stored in memory.
15 protected $collections = [];
20 public function get($collection) {
21 if (!isset($this->collections[$collection])) {
22 $this->collections[$collection] = new MemoryStorage($collection);
24 return $this->collections[$collection];