Recommanded Free YOUTUBE Lecture: <% selectedImage[1] %>

EXISTS key

  • 1.0.0 부터지원
  • 시간 복잡도 : O(1)

Return value

  • 키가 있으면 1
  • 키가 없으면 0

예제

redis> SET key1 "Hello"
ok
redis> EXISTS key1
1
redis> EXISTS key2
0