Skip to content

Commit

Permalink
Document memcache max key length
Browse files Browse the repository at this point in the history
Signed-off-by: David Weitzman <dweitzman@pinterest.com>
  • Loading branch information
dweitzman committed Dec 4, 2020
1 parent 06a7f0c commit 7e68912
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,9 @@ To configure a Memcache instance use the following environment variables instead
With memcache mode increments will happen asynchronously, so it's technically possible for
a client to exceed quota briefly if multiple requests happen at exactly the same time.

Note that Memcache has a max key length of 250 characters, so operations referencing very long
descriptors will fail.

# Contact

* [envoy-announce](https://groups.google.com/forum/#!forum/envoy-announce): Low frequency mailing
Expand Down
3 changes: 3 additions & 0 deletions src/memcached/cache_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
// limit the number of RPCs. First we call increment, then add if the increment
// failed, then increment again if the add failed (which could happen if there was
// a race to call "add").
//
// Note that max memcache key length is 250 characters. Attempting to get or increment
// a longer key will return memcache.ErrMalformedKey

package memcached

Expand Down

0 comments on commit 7e68912

Please sign in to comment.