Redis store key without a value

后端 未结 4 1882
时光取名叫无心
时光取名叫无心 2021-02-06 22:31

When using the Redis expire commands like SETEX and TTL, there are scenarios in which there is no need for the key to hold a v

4条回答
  •  余生分开走
    2021-02-06 22:40

    Do you serialize everything coming to and from redis, yourself? If so, you may consider using a sentinel value (like a NONE constant, etc.) which is set to something like 'None'.

提交回复
热议问题