summaryrefslogtreecommitdiff
path: root/memcache.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #28 from erankor/masterSean Reifschneider2014-02-081-6/+22
|\ | | | | add support for touch command
| * add support for touch commanderan.kornblau2014-01-281-6/+22
| |
* | Allow specifying an empty server list.Glenn Maynard2014-02-061-0/+3
|/ | | | | | | | | | | | | | | | | | If the server list is empty, behave the same as if all servers are down. This allows clients to not care whether memcache is actually in use: mc = memcache.Client(get_my_memcache_servers()) mc.get('cache') If you're not using memcache at all, get_my_memcache_servers() just returns [], and the client code doesn't need to know the difference. Previously, it would fail: >>> mc = memcache.Client([]) >>> mc.get('x') File "memcache.py", line 353, in _get_server server = self.buckets[serverhash % len(self.buckets)] ZeroDivisionError: integer division or modulo by zero
* Changing unknown flags on GET to raise ValueError.Sean Reifschneider2013-08-251-0/+1
|
* Reverting an accidental key-space change.Sean Reifschneider2013-08-191-1/+1
|
* Alowing SERVER_MAX* to be set after import.Sean Reifschneider2013-08-121-3/+6
|
* For 1.53 release.release-1.53Sean Reifschneider2013-06-071-1/+1
|
* Marking connection dead in readline().Sean Reifschneider2013-06-031-9/+4
| | | | Also fixing a docstring test.
* Fixing AttributeError raised during set_multi.Sean Reifschneider2013-06-021-4/+10
|
* Fixing readability of set_multi docstrings.Sean Reifschneider2013-06-021-21/+34
|
* Updating version number.release-1.52Sean Reifschneider2013-06-021-1/+1
|
* Reverting back to re.match for key checking.Sean Reifschneider2013-06-021-15/+4
|
* If Python <2.6, use regex to test keys.Sean Reifschneider2013-06-021-6/+17
|
* For 1.51 release.release-1.51Sean Reifschneider2013-05-061-1/+1
|
* Changing check_key to check_keys.release-1.49Sean Reifschneider2013-05-061-3/+3
|
* check_key disabling and performance improvements.Sean Reifschneider2013-05-041-11/+20
| | | | | | | | | | * Client() now takes a "check_key" option, which defaults to True. If False, it disables the checking of keys to ensure they have acceptable size and are composed of non-control characters. Suggested by Ben Hoyt. * Converting control character checking of keys based on performance testing of alternatives by Ben Hoyt.
* Converting unicode test from using u''.Sean Reifschneider2013-04-171-3/+4
|
* Set after server dies raises AttributeError.Sean Reifschneider2013-03-301-2/+2
|
* incr/decr return None on server connection fail.Sean Reifschneider2013-03-291-2/+2
|
* Adding patch for IPv6 connection string.Sean Reifschneider2013-03-281-0/+14
|
* * Bug #974632: _ConnectionDeadError sometimes was escaping the get/setSean Reifschneider2012-04-111-14/+24
| | | | | | | | | code. This should return to readline() not raising an exception, except in the case that it's called from the get/set(). Report from Gary Poster, proposed patch by Brad Crittenden. Misc fixes by Brad Crittenden: fixing a docstring, if "port" is set to any false-like value it will default to 11211.
* Bug #887765: Interrupted connection to memcache server can causeSean Reifschneider2011-11-291-7/+26
| | | | | | | | inconsistencies. Added "flush_on_reconnect" (defaults to off) to Client() which will cause a client that has lost connection to a server and then reconnects to flush the cache on the reconnect so that it doesn't get old values from that server. Patch by Daniel Benamy.
* Bug #745633: Values of maximum size are not storedSean Reifschneider2011-11-271-3/+14
| | | | | | | | API inconsistency, max value length was tested for <= while max KEY length was <. So I picked that keys and values *LONGER* than the specified max value are what is used, and added documentation and tests to that effect. The test for max value tested that length plus 4, so I've changed that to be that value plus 1.
* Adding commented-out timed delete test.Sean Reifschneider2011-11-271-2/+15
|
* * Bug #713451: server.expect("END") needs to be in a finally blockSean Reifschneider2011-11-271-2/+4
| | | | | Expect an "END" when the _recv_value() raises an exception. Patch by Jay Farrimond.
* Reverting patch that allows spaces in key.Sean Reifschneider2011-11-271-1/+1
|
* Bug: #741090: cas cache can grow unbounded. Default now is that theSean Reifschneider2011-11-271-3/+19
| | | | | | | cache is not used, unless the "Client()" object is created with "cache_cas=True". In that case, you need to have your own cas clearing code, a simple one would be to use Client().reset_cas() to completely clear the cas_ids cache. Problem pointed out by Shaun Cutts.
* Bug: #794456: Spaces in memcache keynamesSean Reifschneider2011-11-271-1/+1
| | | | Now allow spaces in keys. Proposed by cpaetzel.
* Bug #728359: Make python-memcache work on memcache restarts.Sean Reifschneider2011-11-271-46/+93
| | | | | Patch by Tarek Ziade', reviewed and further patches submitted by Hugo Beauze'e-Luysse and Neganov Alexandr.
* Adding Makefile and fixing tests.Sean Reifschneider2011-11-271-0/+1
|
* * Bug #798342: If memcached server sends unknown flag in response forSean Reifschneider2011-11-271-1/+1
| | | | | | "get", results in: "UnboundLocalError: local variable 'val' referenced before assignment" Now returns "None" instead. Patch by Sharoon Thomas
* Bug #680359: useoldserverhashfunction is brokenSean Reifschneider2010-12-161-0/+1
|
* Delete result code checking.Sean Reifschneider2010-12-151-4/+10
|
* When using set_multi and one value is too big, tracebackSean Reifschneider2010-12-151-6/+10
|
* Bug #529855: Server host can now be bare host without ":<port>".Sean Reifschneider2010-12-151-1/+1
|
* readline() returns '' instead of None on dead server.Sean Reifschneider2010-12-151-1/+1
|
* Typo fix "compession" -> "compRession".Sean Reifschneider2010-12-151-1/+1
|
* Fixing Bug #509712: "TypeError: 'NoneType' object is unsubscriptable"Sean Reifschneider2010-12-151-5/+3
| | | | | Also fixed some other similar code to not have issues with that. Also added changelog entries for the last two patches.
* Bug #633553: Add stat arguments support.Sean Reifschneider2010-12-151-2/+8
|
* Bug #628339: Read from server sometimes failsSean Reifschneider2010-12-151-0/+2
|
* Changing licensing and authorship.Sean Reifschneider2010-02-081-2/+4
|
* Release script is adding document file.Sean Reifschneider2009-11-281-1/+2
|
* Running tests and fixing issues found so far.Sean Reifschneider2009-11-281-44/+53
| | | | Adding overall test status message.
* * Per-connection max server key length. Patch by Nicolas DelabySean Reifschneider2009-11-271-35/+40
|
* Reverting the change for different serializers until I hear back fromSean Reifschneider2009-11-271-59/+4
| | | | author.
* * Adding support for multiple deserialization formats including PHP andSean Reifschneider2009-11-271-4/+59
| | | | | | JSON. Patch by Gavin M. Roy. PHP requires http://pypi.python.org/pypi/phpserialize
* * Patches to make memcached more garbage-collectable. RemovesSean Reifschneider2009-11-271-122/+18
| | | | | "debugfunc" argument from _Host objects and changed to "debug" boolean. Patch by John McFarlane.
* * Rejecting keys that have spaces in them. Patch by Etienne Posthumus.Sean Reifschneider2009-11-271-2/+2
|
* * Fixing exception raising syntax. Patch by Samuel Stauffer.Sean Reifschneider2009-11-271-38/+36
| | | | | | | | * Optimizations in read code. Patch by Samuel Stauffer. * Changing classes to be newstyle. Patch by Samuel Stauffer. * Changed "has_key" to "in". Patch by Samuel Stauffer.
* * incr/decr were raising ValueError if the key did not exist, theSean Reifschneider2009-11-271-14/+196
| | | | | | | | | docstring said it returned none. Patch by Chihiro Sakatoku. * Included cmemcache_hash, by permission of Ludvig Ericson. To use, do "memcached.cmemcache_activate()". * Adding cas method, submitted by Ben Gutierrez.