/** * Put the permission to cache * * @param code String - the user code * @param permission Permission - the user permission * @throws CacheException - when there is any error happens */ public static void put(String code, Permission permission) throws CacheException { LongLiveRegionService.put(applyStrategy(code), permission); }
/** * Return user permission in cache * * @param code String - the user code * @return Permission - the user permission * @throws CacheException - when there is any error happens */ public static Permission get(String code) throws CacheException { return LongLiveRegionService.get(applyStrategy(code), Permission.class); }