summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Parise <jon@pinterest.com>2020-05-19 14:36:17 -0700
committerGitHub <noreply@github.com>2020-05-19 14:36:17 -0700
commit0275e2d9ca2c79de06c92eeb4a572ca90994cff1 (patch)
treec8c0f87664dd26763be3de47d4eced6cbead3df6
parent2cb758cdc3ad36a0ea2ce0ff23e6b9bbdf03aa49 (diff)
downloadpymemcache-0275e2d9ca2c79de06c92eeb4a572ca90994cff1.tar.gz
Mention PooledClient in the documentation (#285)
-rw-r--r--docs/getting_started.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index 25690e6..dc9ea26 100644
--- a/docs/getting_started.rst
+++ b/docs/getting_started.rst
@@ -24,6 +24,19 @@ passing the socket's path to the client's ``server`` parameter:
client = Client('/var/run/memcached/memcached.sock')
+Using a client pool
+-------------------
+:class:`pymemcache.base.PooledClient`: is a thread-safe client pool that
+provides the same API as :class:`pymemcache.base.Client`:. It's useful in
+for cases when you want to maintain a pool of already-connected clients
+for improved performance.
+
+.. code-block:: python
+
+ from pymemcache.client.base import PooledClient
+
+ client = PooledClient(('127.0.0.1', 11211), max_pool_size=4)
+
Using a memcached cluster
-------------------------
This will use a consistent hashing algorithm to choose which server to
@@ -53,6 +66,7 @@ To enable TLS in pymemcache, pass a valid TLS context to the client's
``tls_context`` parameter:
.. code-block:: python
+
import ssl
from pymemcache.client.base import Client