[ckan-changes] commit/ckanext-stats: dread: [stats]: Improve reading of cache config option.

Bitbucket commits-noreply at bitbucket.org
Thu Jun 2 14:24:52 UTC 2011


1 new changeset in ckanext-stats:

http://bitbucket.org/okfn/ckanext-stats/changeset/63a79d5c939d/
changeset:   63a79d5c939d
branches:    
user:        dread
date:        2011-06-02 16:24:46
summary:     [stats]: Improve reading of cache config option.
affected #:  1 file (10 bytes)

--- a/ckanext/stats/stats.py	Thu Jun 02 15:22:45 2011 +0100
+++ b/ckanext/stats/stats.py	Thu Jun 02 15:24:46 2011 +0100
@@ -7,7 +7,7 @@
 
 # Use a private config option to enable the cache, rather than the ckan.cache_enabled,
 # because we want to default it to on. It is such an intensive operation.
-cache_enabled = config.get('ckan.stats_cache_enabled', True)
+cache_enabled = asbool(config.get('ckan.stats_cache_enabled', 'True'))
 if cache_enabled:
     from pylons import cache
     our_cache = cache.get_cache('stats', type='dbm')

Repository URL: https://bitbucket.org/okfn/ckanext-stats/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list