Package Exports
- decorator-cache-getter
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (decorator-cache-getter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Decorator Cache Getter
Simple decorator for caching getters on first access.
Installation
npm install decorator-cache-getter --save
Usage
import { cache } from "decorator-cache-getter";
class User {
@cache
get friends() {
return sql("SELECT * FROM users WHERE ...")
}
}
const user = new User()
const friends = await user.friends;
License
MIT