Myuu's blog | 谬喵的博客 | ミュウのブログ
  • 关于go-redis与KeepTTL

    Dec 22, 2021 · 1 min read · golang redis  ·
    Share on:

    ​ Redis在6.0版本之后增加了SET命令的KEEPTTL选项保留该键的生存时间,但是go-redis只在注释里备注了,没有做校验或向下兼容,如果对应的redis服务器版本小于6.0直接使用-1作为失效时间则会直接收到错误。 // Set Redis `SET key value [expiration]` command. // Use expiration for `SETEX`-like behavior. // // Zero expiration means the key has no expiration time. // KeepTTL is a Redis KEEPTTL option to keep …

    Read More

Recent Posts

  • 关于go image.Decode与import _
  • 关于go-redis与KeepTTL
  • 解决MongoDB Compass报Current topology does not support sessions
  • 关于protocol buffer命名冲突与解决
  • 利用hugo和GitHub Pages搭建一个易用的个人博客

Tags

GOLANG 3 GITHUB-PAGES 1 HUGO 1 MONGODB 1 NODE.JS 1 PROTOBUF 1 REDIS 1
Myuu's blog | 谬喵的博客 | ミュウのブログ

Copyright  MYUU'S BLOG | 谬喵的博客 | ミュウのブログ. All Rights Reserved