Closed jinzhongjia closed 2 years ago
Hey @yingyi666 thanks for filing the issue,
Both ristretto
and bigcache
don't have complete implementations for GetWithTTL()
as seen here and here. Checking upstream implementation,
ristretto
seems to have a supporting API to fetch TTL for specific keys (REF). So it can easily be implemented in gocache
, if you want to contribute.bigcache
doesn't seem to have a supporting API to enable this. Documentation probably needs to be updated to state the same.ok,thanks,I understand.
I found this problem when I set the validity period for the data.
i use
store.Options
to set the Expiration ,and the ttl I got is 0 when it based onristretto
orbigcache
, butgo-cache
works normally. here is my code:ristretto
bigcache