UNPKG

@nangazaki/vue-rbac

Version:

Role-Based Access Control (RBAC) implementation for Vue.js

3 lines (2 loc) 268 B
class t{constructor(t){this.fetchedAt=null,this.ttl=t}isValid(){return 0!==this.ttl&&null!==this.fetchedAt&&Date.now()-this.fetchedAt<this.ttl}touch(){this.fetchedAt=Date.now()}invalidate(){this.fetchedAt=null}}export{t as CacheTTL}; //# sourceMappingURL=cache.js.map