From 93575fc9846190346c2cace38773d572216f51b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Guti=C3=A9rrez?= Date: Wed, 10 Dec 2014 17:16:29 +0100 Subject: [PATCH 1/2] fix example in docstring for kivy.cache module --- kivy/cache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kivy/cache.py b/kivy/cache.py index 10e73503a..f0362223d 100644 --- a/kivy/cache.py +++ b/kivy/cache.py @@ -13,12 +13,12 @@ timeout of 5 seconds:: Cache.register('mycache', limit=10, timeout=5) # create an object + id - text = 'objectid' + key = 'objectid' instance = Label(text=text) Cache.append('mycache', text, instance) # retrieve the cached object - instance = Cache.get('mycache', label) + instance = Cache.get('mycache', key) If the instance is NULL, the cache may have trashed it because you've not used the label for 5 seconds and you've reach the limit. From fc493868da21be0ae56bcf599e62b2f3736384aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Guti=C3=A9rrez?= Date: Wed, 10 Dec 2014 17:39:38 +0100 Subject: [PATCH 2/2] fix example in docstring for Cache --- kivy/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kivy/cache.py b/kivy/cache.py index f0362223d..bee4b9efb 100644 --- a/kivy/cache.py +++ b/kivy/cache.py @@ -15,7 +15,7 @@ timeout of 5 seconds:: # create an object + id key = 'objectid' instance = Label(text=text) - Cache.append('mycache', text, instance) + Cache.append('mycache', key, instance) # retrieve the cached object instance = Cache.get('mycache', key)