Browse Source

Do use cache

imwald
Nuša Pukšič 3 months ago
parent
commit
210b48c473
  1. 4
      src/Controller/ArticleController.php

4
src/Controller/ArticleController.php

@ -100,10 +100,10 @@ class ArticleController extends AbstractController
$cacheKey = 'article_' . $article->getEventId(); $cacheKey = 'article_' . $article->getEventId();
$cacheItem = $articlesCache->getItem($cacheKey); $cacheItem = $articlesCache->getItem($cacheKey);
//if (!$cacheItem->isHit()) { if (!$cacheItem->isHit()) {
$cacheItem->set($converter->convertToHTML($article->getContent())); $cacheItem->set($converter->convertToHTML($article->getContent()));
$articlesCache->save($cacheItem); $articlesCache->save($cacheItem);
//} }
$key = new Key(); $key = new Key();
$npub = $key->convertPublicKeyToBech32($article->getPubkey()); $npub = $key->convertPublicKeyToBech32($article->getPubkey());

Loading…
Cancel
Save