内存缓存不会存储键/值,因为该值太大 [英] memcache won't store key/value because the value is too big
问题描述
cache.set(key, Biglist, 3600)
print cache.get(key)
当我的大名单"是一个包含大量内容的庞大列表时,它似乎没有存储.
When my "Biglist" is a huge list of lots of content, it doesn't seem to store.
但是当我将其更改为小文本(例如"abc")时,它会存储.
But when I change it to small text like "abc", it stores.
我必须配置什么才能设置内存缓存以接受键/值的无限大小?
What do I have to configure so that I can set my memcache to accept unlimited size of key/value?
推荐答案
请参见常见问题解答中可以存储的最大数据量是多少部分.
您可以存储的最大数据量是多少? (1兆字节)
您可以在memcached中存储的值的最大大小为1 MB.如果您的数据较大,请考虑客户端压缩或将值拆分为多个键.
The maximum size of a value you can store in memcached is 1 megabyte. If your data is larger, consider clientside compression or splitting the value up into multiple keys.
为什么项目的大小限制为1 MB?
啊,这是一个受欢迎的问题!
Ahh, this is a popular question!
简短的回答:由于内存分配器算法的工作原理.
Short answer: Because of how the memory allocator's algorithm works.
这篇关于内存缓存不会存储键/值,因为该值太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!