Wiredcraft / loopback-cache

Cache solutions for Loopback.
MIT License
24 stars 1 forks source link

support CB ttl long than 30days #46

Closed xavierchow closed 5 years ago

xavierchow commented 5 years ago

There is a limitation of CB TTL: http://docs.couchbase.com/sdk-api/couchbase-node-client-2.1.2/Bucket.html#touch

So if you want a TTL > 30day, CB will see it as an absolute time from epoch. My idea is the mixin checks the option.ttl if it's > 30 days, we see it as a delta, i.e. reset expiry to Date.now() + option.ttl.

@makara

xavierchow commented 5 years ago

Done with v0.2.1, @makara can you help to pubilsh to npm?

makara commented 5 years ago

can you give me your npm username? I can add you as a maintainer.

another thing, you forgot to update the changelog.

xavierchow commented 5 years ago

my npm account: xavierchow

makara commented 5 years ago

invited

xavierchow commented 5 years ago

shipped with v0.2.1, closing.