/** * In addition to all writes being stored to $local, we'll also * keep get() values around ;). * * {@inheritdoc} */ public function get($key, &$token = null) { $value = $this->transaction->get($key, $token); // only store if we managed to retrieve a value (valid token) and it's // not already in cache (or we may mess up tokens) if ($value !== false && $this->local->get($key, $localToken) === false && $localToken === null) { $this->local->set($key, $value); } return $value; }