MCPcopy Create free account
hub / github.com/MALSync/MALSync / valueValid

Method valueValid

src/utils/Cache.ts:17–20  ·  view source on GitHub ↗
(value, ttl)

Source from the content-addressed store, hash-verified

15 }
16
17 protected valueValid(value, ttl) {
18 if (!value || !value.timestamp) return false;
19 return new Date().getTime() < value.timestamp + ttl;
20 }
21
22 protected ttlValid(value) {
23 return this.valueValid(value, this.ttl);

Callers 2

ttlValidMethod · 0.95
refetchTtlValidMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected