mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-01 02:46:04 +01:00
Remove caching from Pages count (regular)
This commit is contained in:
@@ -910,17 +910,8 @@ class Admin
|
||||
public function pagesCount()
|
||||
{
|
||||
if (!$this->pages_count) {
|
||||
/** @var Cache $cache */
|
||||
$cache = $this->grav['cache'];
|
||||
$count = $cache->fetch('admin-pages-count');
|
||||
if (false === $count) {
|
||||
$pages = static::enablePages();
|
||||
|
||||
$count = count($pages->all());
|
||||
$cache->save('admin-pages-count', $count);
|
||||
}
|
||||
|
||||
$this->pages_count = $count;
|
||||
$pages = static::enablePages();
|
||||
$this->pages_count = count($pages->all());
|
||||
}
|
||||
|
||||
return $this->pages_count;
|
||||
|
||||
Reference in New Issue
Block a user