1.6.0 • Published 8 months ago
koatty_cacheable v1.6.0
koatty_cacheable
Cacheable for koatty.
Koatty框架的 CacheAble, Cacheable, CacheEvict 支持库
Usage
db.ts in koatty project:
export default {
...
"CacheStore": {
type: "memory", // redis or memory, memory is default
// key_prefix: "koatty",
// host: '127.0.0.1',
// port: 6379,
// name: "",
// username: "",
// password: "",
// db: 0,
// timeout: 30,
// pool_size: 10,
// conn_timeout: 30
},
...
};
used in service:
import { CacheAble, CacheEvict, GetCacheStore } from "koatty_cacheable";
export class TestService {
@CacheAble("testCache") // auto cached
getTest(){
//todo
}
@CacheEvict("testCache") // auto clear cache
setTest(){
//todo
}
test(){
const store = GetCacheStore(this.app);
store.set(key, value);
}
}
1.6.0
8 months ago
1.5.0
1 year ago
1.4.3
1 year ago
1.4.2
2 years ago
1.4.1
2 years ago
1.4.0
2 years ago
1.3.8
2 years ago
1.3.7
3 years ago
1.3.6
4 years ago
1.3.4
4 years ago
1.3.2
4 years ago
1.2.12
4 years ago
1.2.11
4 years ago
1.2.8
4 years ago
1.2.7
4 years ago
1.2.10
4 years ago
1.2.5
4 years ago
1.2.3
4 years ago
1.2.2
5 years ago
1.2.0
5 years ago
1.2.1
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.0
5 years ago