Re: Beaker 1.1 Release
On Nov 24, 2008, at 7:19 AM, Walter Cruz wrote: Beaker 1.1 still generates: TypeError: __init__() got an unexpected keyword argument 'digest_filenames' on google appengine. I will try to provide a patch. This issue is fixed in the latest release. Cheers, Ben smime.p7s Description: S/MIME cryptographic signature
Re: Beaker 1.1 Release
wow I love the tar thing. It's fine by me ! Philip Jenvey wrote: On Nov 19, 2008, at 1:47 PM, Michael Bayer wrote: also your usage is more succinct via: response = cache.get_value(request, expiretime=x, createfunc=lambda: func(self, *arg, **kw)) Mike, I've attempted a quick and dirty auto upgrade patch for the Beaker 1.0.x format to 1.1, take a look: http://pylonshq.com/pasties/1003 -- Philip Jenvey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker 1.1 Release
On Nov 19, 2008, at 1:47 PM, Michael Bayer wrote: also your usage is more succinct via: response = cache.get_value(request, expiretime=x, createfunc=lambda: func(self, *arg, **kw)) Mike, I've attempted a quick and dirty auto upgrade patch for the Beaker 1.0.x format to 1.1, take a look: http://pylonshq.com/pasties/1003 -- Philip Jenvey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker 1.1 Release
Thanks Mike - that all works great! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker 1.1 Release
Hi, Not sure if some usage has changed, but when I upgraded to 1.1, my expiretime parameter in cache.get_value() doesnt seem to have any effect - new caches are made, but don't seem to be replaced when the time is up. If I roll back to 0.9 it works fine. Code: request = web.ctx.environ['PATH_INFO'] + web.ctx.environ ['QUERY_STRING'] cache = web.ctx.environ['beaker.cache'].get_cache('lif_public') try: response = cache.get_value(request, expiretime=3*60) except: cache.set_value(request, func(self, *args, **kwargs)) response = cache.get_value(request) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker 1.1 Release
also your usage is more succinct via: response = cache.get_value(request, expiretime=x, createfunc=lambda: func(self, *arg, **kw)) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Beaker 1.1 Release
Beaker 1.1 has been released. I only mention it here because those upgrading should note that the pickled file format for Beaker has CHANGED. This means that ALL PRIOR BEAKER CACHE FILES SHOULD BE REMOVED AFTER UPGRADING. Otherwise your application will throw errors as it won't find the expected values in the cache. Beaker 1.1 CHANGELOG: * file-based cache will not hold onto cached value once read from file; will create new value if the file is deleted as opposed to re-using what was last read. This allows external removal of files to be used as a cache-invalidation mechanism. * Sending type and other namespace config arguments to cache.get()/ cache.put()/cache.remove_value() is deprecated. The namespace configuration is now preferred at the Cache level, i.e. when you construct a Cache or call cache_manager.get_cache(). This removes the ambiguity of Cache's dictionary interface and has_key() methods, which have no awareness of those arguments. * the expiretime in use is stored in the cache itself, so that it is always available when calling has_key() and other methods. Between this change and the deprecation of 'type', the Cache no longer has any need to store cache configuration in memory per cache key, which in a dynamically-generated key scenario stores an arbitrarily large number of configurations - essentially a memory leak. * memcache caching has been vastly improved, no longer stores a list of all keys, which along the same theme prevented efficient usage for an arbitrarily large number of keys. The keys() method is now unimplemented, and cache.remove() clears the entire memcache cache across all namespaces. This is what the memcache API provides so it's the best we can do. * memcache caching passes along expiretime to the memcached time parameter, so that the cache itself can reduce its size for elements which are expired (memcache seems to manage its size in any case, this is just a hint to improve its operation). * replaced homegrown ThreadLocal implementation with threading.local, falls back to a 2.3 compat one for python2.4 Cheers, Ben smime.p7s Description: S/MIME cryptographic signature