esnme/ultramemcache — pull request #13 by tarekziade (2012-09-07 13:40:23+00:00)
Title: Configurable max size for items

This initial patch for comments adds a maxSize option in the python level class, and uses it in the Client apis.

By default the value is 1000*1000, but one may change it when she creates a Client class in Python:

```python
>>> import umemcache
>>> c = umemcache.Client('127.0.0.1:11211', 5)
>>> c.connect()
>>> c.set('ok', 'ok')
'STORED'
>>> c.set('ok', 'bigger than 5 bytes')
Traceback (most recent call last):
File "", line 1, in
RuntimeError: Operation failed
```

I wrote this patch in a separate branch to make it easy to review, so the Operation failed message will have more info and say that the max size was reached, once the other patch is merged