]> ToastFreeware Gitweb - philipp/winterrodeln/wrfeed.git/blobdiff - wrfeed/lib/app_globals.py
Renamed feed module in wrfeed (however, the URL stays the same).
[philipp/winterrodeln/wrfeed.git] / wrfeed / lib / app_globals.py
diff --git a/wrfeed/lib/app_globals.py b/wrfeed/lib/app_globals.py
new file mode 100644 (file)
index 0000000..2366bba
--- /dev/null
@@ -0,0 +1,19 @@
+"""The application's Globals object"""
+
+from beaker.cache import CacheManager
+from beaker.util import parse_cache_config_options
+
+class Globals(object):
+
+    """Globals acts as a container for objects available throughout the
+    life of the application
+
+    """
+
+    def __init__(self, config):
+        """One instance of Globals is created during application
+        initialization and is available during requests via the
+        'app_globals' variable
+
+        """
+        self.cache = CacheManager(**parse_cache_config_options(config))