/** * 删除缓存 */ public static function delete($paramArr) { $options = array('module' => false, 'tbl' => 'tbl', 'key' => false, 'retry' => true); if (is_array($paramArr)) { $options = array_merge($options, $paramArr); } extract($options); if (!$module || !isset(self::$_cacheCfg[$module])) { return false; } $cfg = self::$_cacheCfg[$module]["write"]; #服务器数据 $server = $cfg["server"]; $db = $module; $md5key = md5($key); $tbl = $tbl ? $tbl : "tbl"; $collection = $tbl . '_' . substr($md5key, 0, 2); try { API_MongoDB::remove($server, $db, $collection, $md5key); } catch (Exception $e) { if (!empty($options['retry'])) { $options['retry'] = false; self::delete($options); } } return true; }