@travetto/cache
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -15,3 +15,3 @@ { | ||
}, | ||
"license": "ISC", | ||
"license": "MIT", | ||
"main": "index.ts", | ||
@@ -25,3 +25,3 @@ "name": "@travetto/cache", | ||
}, | ||
"version": "0.0.10" | ||
"version": "0.0.11" | ||
} |
travetto: Cache | ||
=== | ||
Provides a simple wrapper around `lru-cache` to provide standard caching constructs. Provides an annotation | ||
to allow caching at the method level throughout the system. | ||
Provides a simple wrapper around `lru-cache` to provide standard caching constructs. | ||
Provides a decorator to allow caching at the method level throughout the system. Will rewrite the method | ||
to cache on successful responses. | ||
```typescript | ||
class Worker { | ||
@Cacheable({ max: 1000 }) | ||
calculateExpensiveResult(expression: string) { | ||
... | ||
return value; | ||
} | ||
} | ||
``` |
6041
19