public static function ask_cache_check_version($force = false) { $kvprefix = defined('KV_PREFIX') ? KV_PREFIX : ''; $key = md5($kvprefix . self::$_cache_check_version_key); if ($force || self::instance()->fetch($key, $val) === false) { $val = md5($kvprefix . time()); self::instance()->store($key, $val); self::$_cache_check_version = $val; //todo:强制更新 } return $val; }
public static function ask_cache_check_version($force = false) { $key = self::get_cache_check_version_key(); if (self::enable()) { if ($force || self::instance()->fetch($key, $val) === false) { $val = md5($key . time()); self::instance()->store($key, $val); self::$_cache_check_version = $val; //todo:强制更新 } return $val; } else { return 'static'; } }