Skip to content

Commit

Permalink
Merge pull request #212 from jparise/prepare-2.1.0
Browse files Browse the repository at this point in the history
Finish preparing the 2.1.0 release
  • Loading branch information
jparise authored Jan 8, 2019
2 parents e0ebfbe + ee0a49a commit ef2cf23
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 21 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ New in version 2.1.0
`#197 <https://github.com/pinterest/pymemcache/pull/197>`_
* Add UNIX domain socket support and document server connection options.
`#206 <https://github.com/pinterest/pymemcache/pull/206>`_
* Add support for the ``cache_memlimit`` command.
`#211 <https://github.com/pinterest/pymemcache/pull/211>`_
* Commands key are now always sent in their original order.
`#209 <https://github.com/pinterest/pymemcache/pull/209>`_

New in version 2.0.0
--------------------
Expand Down
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@

# General information about the project.
project = u'pymemcache'
copyright = u'2018, Pinterest'
author = u'Charles Gordon, Nicholas Charriere'
copyright = u'Pinterest 2019'
author = u'Charles Gordon, Nicholas Charriere, Jon Parise, Joe Gordon'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'1.3'
version = u'2.1'
# The full version, including alpha/beta/rc tags.
release = u'1.4.0'
release = u'2.1.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -267,7 +267,7 @@
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'pymemcache.tex', u'pymemcache Documentation',
u'Charles Gordon, Nicholas Charriere', 'manual'),
u'Charles Gordon, Nicholas Charriere, Jon Parise, Joe Gordon', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down
35 changes: 19 additions & 16 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pymemcache provides a default
The serializer uses the highest pickle protocol available. In order to make
sure multiple versions of Python can read the protocol version, you can specify
the version with :code:`get_python_memcache_serializer`
the version with :func:`pymemcache.serde.get_python_memcache_serializer`.

.. code-block:: python
Expand All @@ -94,8 +94,8 @@ the version with :code:`get_python_memcache_serializer`
deserializer=serde.python_memcache_deserializer)
Deserialization with python3
----------------------------
Deserialization with Python 3
-----------------------------

.. code-block:: python
Expand All @@ -110,29 +110,32 @@ Key Constraints
---------------
This client implements the ASCII protocol of memcached. This means keys should not
contain any of the following illegal characters:
> Keys cannot have spaces, new lines, carriage returns, or null characters.
We suggest that if you have unicode characters, or long keys, you use an effective
hashing mechanism before calling this client. At Pinterest, we have found that
murmur3 hash is a great candidate for this. Alternatively you can
set `allow_unicode_keys` to support unicode keys, but beware of
what unicode encoding you use to make sure multiple clients can find the
same key.

Keys cannot have spaces, new lines, carriage returns, or null characters.
We suggest that if you have unicode characters, or long keys, you use an
effective hashing mechanism before calling this client.

At Pinterest, we have found that murmur3 hash is a great candidate for this.
Alternatively you can set `allow_unicode_keys` to support unicode keys, but
beware of what unicode encoding you use to make sure multiple clients can find
the same key.

Best Practices
---------------

- Always set the `connect_timeout` and `timeout` arguments in the
- Always set the ``connect_timeout`` and ``timeout`` arguments in the
:py:class:`pymemcache.client.base.Client` constructor to avoid blocking
your process when memcached is slow. You might also want to enable the
`no_delay` option, which sets the TCP_NODELAY flag on the connection's
``no_delay`` option, which sets the TCP_NODELAY flag on the connection's
socket.
- Use the "noreply" flag for a significant performance boost. The "noreply"
- Use the ``noreply`` flag for a significant performance boost. The ``"noreply``
flag is enabled by default for "set", "add", "replace", "append", "prepend",
and "delete". It is disabled by default for "cas", "incr" and "decr". It
obviously doesn't apply to any get calls.
- Use get_many and gets_many whenever possible, as they result in less
round trip times for fetching multiple keys.
- Use the "ignore_exc" flag to treat memcache/network errors as cache misses
- Use :func:`pymemcache.client.base.Client.get_many` and
:func:`pymemcache.client.base.Client.gets_many` whenever possible, as they
result in fewer round trip times for fetching multiple keys.
- Use the ``ignore_exc`` flag to treat memcache/network errors as cache misses
on calls to the get* methods. This prevents failures in memcache, or network
errors, from killing your web requests. Do not use this flag if you need to
know about errors from memcache, and make sure you have some other way to
Expand Down

0 comments on commit ef2cf23

Please sign in to comment.