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