Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the max key length and max size of value in memcached?

Tags:

I am using the memcached latest , may i know what is the max key length ,and max size of the value we can store in the memcached ?

How to integrate the memcached with spring , any idea please .

like image 792
Bravo Avatar asked Feb 17 '17 13:02

Bravo


People also ask

What is the maximum key size in memcached?

The maximum length of the key in Memcached has a restriction of 250 bytes.

Is Memcached free?

Memcached's website describes Memcached as a 'Free and open source, high-performance, distributed memory object caching system'. Like Redis, Memcached is an open source way to store key value pairs in memory, meaning that data is very quickly retrieved.


1 Answers

If you look at the source the max size of the key is 250 bytes. (look for the KEY_MAX_LENGTH key)

The Maximum size of the object is 1MB by default. But there is an easy way where you can change that by making minor changes in the config. You can look at this.

On integrating memcached with spring, Am not very sure, But you can look at this. It has details on how to use it here.

Hope this helps.

like image 118
pratikvasa Avatar answered Oct 21 '22 04:10

pratikvasa