1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-22 19:44:02 +08:00
course-tencent-cloud/app/Services/Utils/IndexPageCache.php
xiaochong0302 1bef24f217 1.kg_course表增加索引
2.优化错误页
3.优化富文本内容长度获取
4.优化layer关闭窗口后发布状态同步
2023-09-16 20:51:31 +08:00

64 lines
2.0 KiB
PHP

<?php
/**
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
* @license https://opensource.org/licenses/GPL-2.0
* @link https://www.koogua.com
*/
namespace App\Services\Utils;
use App\Caches\IndexSlideList as IndexSlideListCache;
use App\Caches\IndexFeaturedCourseList as IndexFeaturedCourseListCache;
use App\Caches\IndexFreeCourseList as IndexFreeCourseListCache;
use App\Caches\IndexNewCourseList as IndexNewCourseListCache;
use App\Caches\IndexSimpleFeaturedCourseList as IndexSimpleFeaturedCourseListCache;
use App\Caches\IndexSimpleFreeCourseList as IndexSimpleFreeCourseListCache;
use App\Caches\IndexSimpleNewCourseList as IndexSimpleNewCourseListCache;
use App\Caches\IndexSimpleVipCourseList as IndexSimpleVipCourseListCache;
use App\Caches\IndexVipCourseList as IndexVipCourseListCache;
use App\Services\Service as AppService;
class IndexPageCache extends AppService
{
public function rebuild($section = null)
{
if (!$section || $section == 'slide') {
$cache = new IndexSlideListCache();
$cache->rebuild();
}
if (!$section || $section == 'featured_course') {
$cache = new IndexFeaturedCourseListCache();
$cache->rebuild();
$cache = new IndexSimpleFeaturedCourseListCache();
$cache->rebuild();
}
if (!$section || $section == 'new_course') {
$cache = new IndexNewCourseListCache();
$cache->rebuild();
$cache = new IndexSimpleNewCourseListCache();
$cache->rebuild();
}
if (!$section || $section == 'free_course') {
$cache = new IndexFreeCourseListCache();
$cache->rebuild();
$cache = new IndexSimpleFreeCourseListCache();
$cache->rebuild();
}
if (!$section || $section == 'vip_course') {
$cache = new IndexVipCourseListCache();
$cache->rebuild();
$cache = new IndexSimpleVipCourseListCache();
$cache->rebuild();
}
}
}