beaker fails with any consequent 'key1' lookup

"""
[EMAIL PROTECTED]:~$ cat beaker_test.py
from beaker.cache import CacheManager

def createfunc():
    print '  createfunc() called'

cache = CacheManager().get_cache('mycache')

try:
    cache.get_value('key1')
    print 'cache.get_value("key1") passed'
except:
    print 'cache.get_value("key1") failed'

try:
    cache.get_value('key2', createfunc=createfunc)
    print 'cache.get_value("key2") passed'
except:
    print 'cache.get_value("key2") failed'

try:
    cache.get_value('key3')
    print 'cache.get_value("key3") passed'
except:
    print 'cache.get_value("key3") failed'

try:
    cache.get_value('key1')
    print 'cache.get_value("key1") passed'
except:
    print 'cache.get_value("key1") failed'

[EMAIL PROTECTED]:~$ python beaker_test.py
cache.get_value("key1") failed
  createfunc() called
cache.get_value("key2") passed
  createfunc() called
cache.get_value("key3") passed
cache.get_value("key1") failed
[EMAIL PROTECTED]:~$
"""
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to