<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class MemCacheUtil { private static $pool = array(); public static function remember($m1RYi, $l2aoe, $FJAM8 = 10) { goto DDdlB; h5xYr: self::put($m1RYi, $tzAUI, $FJAM8); goto O5uDB; DDdlB: if (array_key_exists($m1RYi, self::$pool)) { $ohYVl = self::$pool[$m1RYi]; if ($ohYVl[0] === 0 || $ohYVl[0] < time()) { return $ohYVl[1]; } } goto XHmmH; O5uDB: return $tzAUI; goto N37jB; XHmmH: $tzAUI = $l2aoe(); goto h5xYr; N37jB: } public static function get($m1RYi) { if (array_key_exists($m1RYi, self::$pool)) { $ohYVl = self::$pool[$m1RYi]; if ($ohYVl[0] === 0 || $ohYVl[0] < time()) { return $ohYVl[1]; } } return null; } public static function put($m1RYi, $tzAUI, $FJAM8 = 0) { self::$pool[$m1RYi] = array($FJAM8 > 0 ? time() + $FJAM8 : 0, $tzAUI); } public static function forget($m1RYi) { if (array_key_exists($m1RYi, self::$pool)) { unset(self::$pool[$m1RYi]); } } }