I'd rewrite this piece for less internal hash checks:

```php
if ($this->cacheLogger) {
    if ($result) {
        $this->cacheLogger->queryCacheMiss($this->regionName, $querykey); 
    }

    if ($cached) {
        $this->cacheLogger->queryCachePut($this->regionName, $querykey); 
    }
}
```