<?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($UtKOH, $GdSl0) { return self::client()->rememberForever($UtKOH, $GdSl0); } public static function remember($UtKOH, $jfNrr, $GdSl0) { return self::client()->remember($UtKOH, intval($jfNrr / 60), $GdSl0); } public static function forget($UtKOH) { return self::client()->forget($UtKOH); } public static function get($UtKOH) { return self::client()->get($UtKOH); } public static function put($UtKOH, $fo71I, $jfNrr) { self::client()->put($UtKOH, $fo71I, ceil($jfNrr / 60)); } public static function forever($UtKOH, $fo71I) { self::client()->forever($UtKOH, $fo71I); } public static function executeInterval($UtKOH, $GdSl0, $K9IuV = 5) { goto vimOf; vimOf: $bAIeC = 'Vendor:CacheInterval:' . $UtKOH; goto tKo3O; tKo3O: $vIA1o = intval(self::get($bAIeC)); goto R9PG3; R9PG3: if ($vIA1o <= 0 || $vIA1o < time()) { self::put($bAIeC, time() + $K9IuV * 60, $K9IuV * 60); call_user_func($GdSl0); } goto ulmda; ulmda: } }