STICK

Syntax

  1. STICK key [key ...]

Time complexity: O(N) where N is the number of keys that will be made sticky.

ACL categories: @keyspace, @write, @fast

Labels one or more keys as sticky, making it impossible for them to be evicted when the Dragonfly instance is running in cache mode. This command is Dragonfly-specific.

Return

Integer reply: Number of keys that were made sticky successfully: those that existed and were not already sticky.

Examples

  1. dragonfly> MSET a 1 b 2
  2. "OK"
  3. dragonfly> STICK a
  4. (integer) 1
  5. dragonfly> STICK a b c
  6. (integer) 1