Skip to main content

STICK

Syntax

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

dragonfly> MSET a 1 b 2
OK
dragonfly> STICK a
(integer) 1
dragonfly> STICK a b c
(integer) 1