Skip to main content

MAX_KEY_LEN

Constant MAX_KEY_LEN 

Source
pub const MAX_KEY_LEN: usize = _; // 65_535usize
Expand description

The largest key, because klen is a u16.

Redis allows 512 MB keys and we do not, deliberately. A key is a thing you look up by, it lives in the index bucket’s neighbourhood, and 64 KiB is already three orders of magnitude past any key anyone has a reason to use. A caller that wants a 512 MB key wants a value.