| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace app\admin\logic;
- use app\admin\model\dao\ShopGoodsType;
- use app\admin\model\dao\ShopHotKeywords;
- use app\common\model\ShopGoods;
- use think\facade\Cache;
- /**
- * 商城商品
- * Class ShopGoodsLogic
- * @package app\admin\logic
- */
- class ShopHotKeywordsLogic
- {
- private static $CACHE_LIST_KEY = "cache:shop_host_keywords:list";
- public static function getCacheList()
- {
- $key = self::$CACHE_LIST_KEY;
- if (Cache::has($key)) {
- return Cache::get($key);
- }
- $name = ShopHotKeywords::getList();
- Cache::set($key, $name, 10 * 60);
- return $name;
- }
- public static function delCache()
- {
- $key = self::$CACHE_LIST_KEY;
- Cache::delete($key);
- }
- }
|