<?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($rY0hM, $hy4YA) { return self::client()->rememberForever($rY0hM, $hy4YA); } public static function remember($rY0hM, $YZltT, $hy4YA) { return self::client()->remember($rY0hM, intval($YZltT / 60), $hy4YA); } public static function forget($rY0hM) { return self::client()->forget($rY0hM); } public static function get($rY0hM) { return self::client()->get($rY0hM); } public static function put($rY0hM, $hsART, $YZltT) { self::client()->put($rY0hM, $hsART, ceil($YZltT / 60)); } public static function forever($rY0hM, $hsART) { self::client()->forever($rY0hM, $hsART); } public static function executeInterval($rY0hM, $hy4YA, $seQTq = 5) { goto SvlqK; waA4r: $rEnAs = intval(self::get($o3L7h)); goto HPiqY; HPiqY: if ($rEnAs <= 0 || $rEnAs < time()) { self::put($o3L7h, time() + $seQTq * 60, $seQTq * 60); call_user_func($hy4YA); } goto dL7t8; SvlqK: $o3L7h = 'Vendor:CacheInterval:' . $rY0hM; goto waA4r; dL7t8: } }