jisoooh94 / aoplocalcaching Goto Github PK
View Code? Open in Web Editor NEWLocal caching module using aspectj aop.
Local caching module using aspectj aop.
시나리오 | 캐시 적중률(%) | 캐싱 종류 | 평균 수행 시간(ms) | 비고 |
---|---|---|---|---|
1 | 100 | aop | 10.08 | |
direct | 1.98 | |||
2 | 0 | aop | 11.04 | |
direct | 2.69 |
//메서드 파라미터중, @CacheKey 어노테이션이 적용되어있는 파라미터만 키에 포함시킨다.
List<Object> keyParamList = IntStream.range(0, args.length)
.boxed()
.filter(idx -> annotations[idx] != null)
.filter(idx -> Stream.of(annotations[idx]).anyMatch(annotation -> annotation.annotationType() == CacheKey.class))
.map(idx -> args[idx])
.collect(Collectors.toList());
//@CacheKey 어노테이션이 적용된 파라미터가 없다면, 전체 파라미터를 키에 포함시킨다.
return StringUtil.format(keyForamt, keyParamList.isEmpty() ? args : keyParamList.toArray());
for(int idx = 0; idx < args.length; idx++) {
if(annotations[idx] != null) {
for(Annotation annotation : annotations[idx]) {
if(annotation.annotationType() == CacheKey.class) {
keyParamList.add(args[idx]);
break;
}
}
}
}
시나리오 | 캐시 적중률(%) | 캐싱 종류 | 평균 수행 시간(ms) | 비고 |
---|---|---|---|---|
1 | 100 | aop | 3.75 | |
direct | 1.95 | |||
2 | 0 | aop | 5.28 | |
direct | 2.49 |
Topic 구분용 Map 을 EnumMap 으로 사용하여 2번의 Hashing 으로 인한 성능저하는 거의 없을것으로 예상
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.