summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-09-10 15:50:21 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-09-10 15:50:21 -0400
commit9b600a18bb0eab30e2cc9dfb0c4dc1f8dfd95768 (patch)
tree7b1ae94052e8a9c5d7e20b5b8c2fc2232a7fdaa7
parenta186329fe0569ec3746a206a039366420f97f8e5 (diff)
downloaddogpile-core-9b600a18bb0eab30e2cc9dfb0c4dc1f8dfd95768.tar.gz
fix the example here
-rw-r--r--README.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/README.rst b/README.rst
index bb6d4fa..5335eba 100644
--- a/README.rst
+++ b/README.rst
@@ -152,9 +152,10 @@ Memcached::
return value
def gen_cached():
- value = my_expensive_database.load_the_value()
+ value = fn()
with mc_pool.reserve() as mc:
mc.put(key, value)
+ return value
dogpile = Dogpile(expiration_time, init=True)