mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-28 13:21:37 +08:00
32 lines
515 B
PHP
32 lines
515 B
PHP
<?php
|
|
|
|
namespace App\Caches;
|
|
|
|
use App\Builders\CategoryTreeList as CategoryTreeListBuilder;
|
|
|
|
class CategoryTreeList extends Cache
|
|
{
|
|
|
|
protected $lifetime = 365 * 86400;
|
|
|
|
public function getLifetime()
|
|
{
|
|
return $this->lifetime;
|
|
}
|
|
|
|
public function getKey($id = null)
|
|
{
|
|
return 'category_tree_list';
|
|
}
|
|
|
|
public function getContent($id = null)
|
|
{
|
|
$builder = new CategoryTreeListBuilder();
|
|
|
|
$list = $builder->handle();
|
|
|
|
return $list ?: [];
|
|
}
|
|
|
|
}
|