<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Util; use Illuminate\Support\Facades\Cache; class CacheUtil { private static function client() { return Cache::store(); } public static function rememberForever($Jo7ME, $k8RFa) { return self::client()->rememberForever($Jo7ME, $k8RFa); } public static function remember($Jo7ME, $tDbBP, $k8RFa) { return self::client()->remember($Jo7ME, intval($tDbBP / 60), $k8RFa); } public static function forget($Jo7ME) { return self::client()->forget($Jo7ME); } public static function get($Jo7ME) { return self::client()->get($Jo7ME); } public static function put($Jo7ME, $gbkxa, $tDbBP) { self::client()->put($Jo7ME, $gbkxa, ceil($tDbBP / 60)); } public static function forever($Jo7ME, $gbkxa) { self::client()->forever($Jo7ME, $gbkxa); } public static function executeInterval($Jo7ME, $k8RFa, $jlaFt = 5) { goto EiLsj; q8uxH: if ($f5xWc <= 0 || $f5xWc < time()) { self::put($uUp5p, time() + $jlaFt * 60, $jlaFt * 60); call_user_func($k8RFa); } goto u2G7J; EiLsj: $uUp5p = 'Vendor:CacheInterval:' . $Jo7ME; goto cCSKI; cCSKI: $f5xWc = intval(self::get($uUp5p)); goto q8uxH; u2G7J: } }