Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions developer_manual/basics/caching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down