[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/config.py Control disk cache options with environment variable.

Malthe Borch mborch at gmail.com
Tue Sep 2 18:24:36 EDT 2008


Log message for revision 90724:
  Control disk cache options with environment variable.

Changed:
  U   z3c.pt/trunk/src/z3c/pt/config.py

-=-
Modified: z3c.pt/trunk/src/z3c/pt/config.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/config.py	2008-09-02 18:43:37 UTC (rev 90723)
+++ z3c.pt/trunk/src/z3c/pt/config.py	2008-09-02 22:24:35 UTC (rev 90724)
@@ -9,7 +9,9 @@
 DEBUG_MODE = DEBUG_MODE.lower() in TRUEVALS
 
 # disable disk-cache to prevent the compiler from caching on disk
-DISK_CACHE = not DEBUG_MODE
+DISK_CACHE_KEY = 'Z3C_PT_CACHE'
+DISK_CACHE = os.environ.get(DISK_CACHE_KEY, 'true')
+DISK_CACHE = DISK_CACHE.lower() in TRUEVALS
 CACHE_EXTENSION = "cache"
 
 # when validation is enabled, dynamically inserted content is



More information about the Checkins mailing list