fixup! Add mongodb option for the jinja bytecode cache
diff --git a/Allura/allura/config/app_cfg.py b/Allura/allura/config/app_cfg.py
index 5cfc952..cb27d64 100644
--- a/Allura/allura/config/app_cfg.py
+++ b/Allura/allura/config/app_cfg.py
@@ -162,7 +162,9 @@ def __init__(self, prefix: str, retain_days: int = 7):
         self._indexes_ensured = False
 
     def _collection(self):
-        collection = Session.by_name('main').bind.db[self.collection_name]
+        # a deployment may point this at a dedicated cache db via ming.cache.*; otherwise it lands in main
+        bind = Session.by_name('cache').bind or Session.by_name('main').bind
+        collection = bind.db[self.collection_name]
         if not self._indexes_ensured:
             collection.create_index('key', unique=True)
             collection.create_index('created', expireAfterSeconds=self.retain_days * 86400)