Merge pull request #2737 from terrex/master

fix example in docstring for kivy.cache module
This commit is contained in:
Akshay Arora 2014-12-10 23:26:11 +05:30
commit 92fa748eaf
1 changed files with 3 additions and 3 deletions

View File

@ -13,12 +13,12 @@ timeout of 5 seconds::
Cache.register('mycache', limit=10, timeout=5) Cache.register('mycache', limit=10, timeout=5)
# create an object + id # create an object + id
text = 'objectid' key = 'objectid'
instance = Label(text=text) instance = Label(text=text)
Cache.append('mycache', text, instance) Cache.append('mycache', key, instance)
# retrieve the cached object # 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 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. not used the label for 5 seconds and you've reach the limit.