Index: globals/get_subscriptions.py |
diff --git a/filters/get_subscriptions.py b/globals/get_subscriptions.py |
similarity index 91% |
rename from filters/get_subscriptions.py |
rename to globals/get_subscriptions.py |
index d5d20768584f4788fab1b1cc46ae68afb35a90b7..17c2c2398e0914bcc17133ea3ce231a7c581a87e 100644 |
--- a/filters/get_subscriptions.py |
+++ b/globals/get_subscriptions.py |
@@ -20,7 +20,12 @@ import urllib |
import logging |
from ConfigParser import SafeConfigParser |
-def get_subscriptions(_): |
+subscriptions = None |
+ |
+def get_subscriptions(): |
+ global subscriptions |
+ if not subscriptions is None: |
+ return subscriptions |
try: |
from sitescripts.subscriptions import subscriptionParser |
except ImportError: |
@@ -57,4 +62,5 @@ def get_subscriptions(_): |
subscriptionParser.get_settings = orig_get_settings |
subscriptionParser.calculate_supplemented(result) |
- return result.values() |
+ subscriptions = result.values() |
+ return subscriptions |