getCommentCache() публичный Метод

Returns the cache container for blog comments:
public getCommentCache ( ) : CacheInterface
Результат CacheInterface
Пример #1
0
 /**
  * @route ajax/blog_load_comments
  */
 public function loadComments()
 {
     if (IDE_HACKS) {
         $this->blog = new Blog();
     }
     $cache = $this->blog->getCommentCache();
     $blog = (string) ($_POST['blogpost'] ?? '');
     if (empty($blog)) {
         \Airship\json_response(['status' => 'error', 'message' => 'No blogpost ID provided']);
     }
     $cachedComments = $cache->get($blog);
     if ($cachedComments) {
         \Airship\json_response($cachedComments);
     }
     $this->fetchComments($cache, $blog);
 }