python-memcached
python-memcached copied to clipboard
Fetch SERVER_MAX_VALUE_LENGTH from server
Hey there,
Thanks for the neat library.
Today I've been hit by memcache.SERVER_MAX_VALUE_LENGTH
, which is statically defined, whereas it could be fetched from the server with item_size_max
from stats settings
.
Would that be a feature of your interest?
I tested memcache with this feature completely removed. Everything seemed to work fine. If an object that is too large is sent, the server returns an error and memcache handles it appropriately. I do not think this does not need to be handled on the python side at all.
A simple example of this issue is:
Set up a memcached server with a 5MB item_size_max and then trying saving something larger than 1MB. It'll fail.
Then edit memcache.SERVER_MAX_VALUE_LENGTH
and mke that 5MB or more and it will work