@@ -0,0 +1,2079 @@
+/**%0A * Copyright (c) 2015-2019, Michael Yang %E6%9D%A8%E7%A6%8F%E6%B5%B7 (fuhai999@gmail.com).%0A * %3Cp%3E%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %3Cp%3E%0A * http://www.apache.org/licenses/LICENSE-2.0%0A * %3Cp%3E%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage io.jboot.utils;%0A%0Aimport com.jfinal.plugin.ehcache.IDataLoader;%0Aimport io.jboot.Jboot;%0A%0Aimport java.util.List;%0A%0A%0Apublic class CacheUtil %7B%0A%0A    public %3CT%3E T get(String cacheName, Object key) %7B%0A        return Jboot.getCache().get(cacheName, key);%0A    %7D%0A%0A    public void put(String cacheName, Object key, Object value) %7B%0A        Jboot.getCache().put(cacheName, key, value);%0A    %7D%0A%0A    public void put(String cacheName, Object key, Object value, int liveSeconds) %7B%0A        Jboot.getCache().put(cacheName, key, value, liveSeconds);%0A    %7D%0A%0A    public List getKeys(String cacheName) %7B%0A        return Jboot.getCache().getKeys(cacheName);%0A    %7D%0A%0A    public void remove(String cacheName, Object key) %7B%0A        Jboot.getCache().remove(cacheName, key);%0A    %7D%0A%0A    public void removeAll(String cacheName) %7B%0A        Jboot.getCache().removeAll(cacheName);%0A    %7D%0A%0A    public %3CT%3E T get(String cacheName, Object key, IDataLoader dataLoader) %7B%0A        return Jboot.getCache().get(cacheName, key, dataLoader);%0A    %7D%0A%0A    public %3CT%3E T get(String cacheName, Object key, IDataLoader dataLoader, int liveSeconds) %7B%0A        return Jboot.getCache().get(cacheName, key, dataLoader, liveSeconds);%0A    %7D%0A%0A    public Integer getTtl(String cacheName, Object key) %7B%0A        return Jboot.getCache().getTtl(cacheName, key);%0A    %7D%0A%0A    public void setTtl(String cacheName, Object key, int seconds) %7B%0A        Jboot.getCache().setTtl(cacheName, key, seconds);%0A    %7D%0A%7D%0A

add CacheUtil