diff options
Diffstat (limited to 'lib/private/Memcache/ProfilerWrapperCache.php')
-rw-r--r-- | lib/private/Memcache/ProfilerWrapperCache.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/private/Memcache/ProfilerWrapperCache.php b/lib/private/Memcache/ProfilerWrapperCache.php index 84e3d880a0c..97d9d828a32 100644 --- a/lib/private/Memcache/ProfilerWrapperCache.php +++ b/lib/private/Memcache/ProfilerWrapperCache.php @@ -18,7 +18,7 @@ use OCP\IMemcacheTTL; * @template-implements \ArrayAccess<string,mixed> */ class ProfilerWrapperCache extends AbstractDataCollector implements IMemcacheTTL, \ArrayAccess { - /** @var Redis $wrappedCache*/ + /** @var Redis $wrappedCache */ protected $wrappedCache; /** @var string $prefix */ @@ -167,6 +167,18 @@ class ProfilerWrapperCache extends AbstractDataCollector implements IMemcacheTTL } /** @inheritDoc */ + public function ncad(string $key, mixed $old): bool { + $start = microtime(true); + $ret = $this->wrappedCache->ncad($key, $old); + $this->data['queries'][] = [ + 'start' => $start, + 'end' => microtime(true), + 'op' => $this->getPrefix() . '::ncad::' . $key, + ]; + return $ret; + } + + /** @inheritDoc */ public function setTTL(string $key, int $ttl) { $this->wrappedCache->setTTL($key, $ttl); } |