/** * {@inheritDoc} */ public function query(Query $query) { $this->logger->startCall(__FUNCTION__, func_get_args(), array('fetchDepth' => $this->transport->getFetchDepth())); $result = $this->transport->query($query); $this->logger->stopCall(); return $result; }
/** * {@inheritDoc} */ public function query(Query $query) { if (empty($this->caches['query'])) { return parent::query($query); } $this->assertLoggedIn(); $cacheKey = "query: {$query->getStatement()}, {$query->getLimit()}, {$query->getOffset()}, {$query->getLanguage()}, " . $this->workspaceName; $cacheKey = $this->sanitizeKey($cacheKey); if ($result = $this->caches['query']->fetch($cacheKey)) { return $result; } $result = parent::query($query); $this->caches['query']->save($cacheKey, $result); return $result; }