From af4d58c0fd54261bf3fb6df1e86f434ef94bf5b4 Mon Sep 17 00:00:00 2001 From: Jonathan Treffler Date: Sun, 18 May 2025 16:03:34 +0200 Subject: [PATCH] fixed call on null errors in cache docs code blocks some code blocks referenced an undefined $this->cache variable instead of the defined $cache Signed-off-by: Jonathan Treffler --- developer_manual/basics/caching.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developer_manual/basics/caching.rst b/developer_manual/basics/caching.rst index 21da6c0a2..dc7c73adc 100644 --- a/developer_manual/basics/caching.rst +++ b/developer_manual/basics/caching.rst @@ -121,7 +121,7 @@ A local cache instance can be acquired through the ``\OCP\ICacheFactory`` servic public function getPicture(string $url): void { $cache = $this->cacheFactory->createLocal('my-app-pictures'); - $cachedPicture = $this->cache->get($url); + $cachedPicture = $cache->get($url); if ($cachedPicture !== null) { return $cachedPicture; } @@ -157,7 +157,7 @@ A distributed cache instance can be acquired through the ``\OCP\ICacheFactory`` public function getPicture(string $url): void { $cache = $this->cacheFactory->createDistributed('my-app-pictures'); - $cachedPicture = $this->cache->get($url); + $cachedPicture = $cache->get($url); if ($cachedPicture !== null) { return $cachedPicture; }