51 Unstar Star 83 Fork 19

WhiteBlue / EasyCache

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

#EasyCache

致力于让缓存使用变得简单轻松(误..)

依赖:ehcache.jar

使用缓存:


 @UseCache(cacheName = "user")
    public User getUser() {
        return new User();
    }

会根据方法的参数生成key,cache的name自行在配置文件里写

清除缓存:

    //单个
    @ClearCache(cacheName = "users")
    public List getUsers() {
        return new ArrayList();
    }

    //多个
    @ClearCache(cacheName = {"user","users"})
    public void deleteUser() {
    }

取得代理对象:


    UserDao dao = CacheFactory.get(UserDao.class);
    dao.getUser();
    dao.getUsers();
    dao.deleteUser();

以上,之后会缓慢更新(如果有想法的话)

Comments ( 0 )

Sign in for post a comment

About

ehcache的极简封装,基于注解形式的缓存框架,使用简单 spread retract
Cancel

Releases

No release

Gitee Metrics

Contributors

All

Activities

load more
can not load any more
Java
1
https://git.oschina.net/whiteblue/EasyCache.git
git@git.oschina.net:whiteblue/EasyCache.git
whiteblue
EasyCache
EasyCache
master

Search