Slide 68
Slide 68 text
cache_aspect.ts
export class CacheAspect {
@before(/^UserMapper$/, /^get/)
beforeUserFinderGetInvocation(meta, id) {
this.queryCache(lsCache, meta.method, id);
}
@after(/^UserMapper$/, /^get/)
afterUserFinderGetInvocation(meta, id) {
this.setCache(lsCache, meta.method, id);
}
// same for Http
queryCache(cache, method, id) { }
setCache(cache, method, id) { }
}