serializer = $serializer; $this->connection = $connection; } /** * {@inheritdoc} */ public function get($collection) { if (!isset($this->storages[$collection])) { $this->storages[$collection] = new DatabaseStorageExpirable($collection, $this->serializer, $this->connection); } return $this->storages[$collection]; } /** * Deletes expired items. */ public function garbageCollection() { $this->connection->delete('key_value_expire') ->condition('expire', REQUEST_TIME, '<') ->execute(); } }