diff rhodecode/model/meta.py @ 609:c1c1cf772337

moved out sqlalchemy cache from meta to the config files. added caching query for permissions.
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 12 Oct 2010 16:39:53 +0200
parents 342f8434ed14
children 79457e03ef68
line wrap: on
line diff
--- a/rhodecode/model/meta.py	Tue Oct 12 13:03:14 2010 +0200
+++ b/rhodecode/model/meta.py	Tue Oct 12 16:39:53 2010 +0200
@@ -28,36 +28,6 @@
 #===============================================================================
 # CACHE OPTIONS
 #===============================================================================
-cache_base = jn(dn(dn(dn(abspath(__file__)))), 'data')
-cache_dir = jn(cache_base, 'cache')
-
-if not os.path.isdir(cache_base):
-    os.mkdir(cache_base)
-
-if not os.path.isdir(cache_dir):
-    os.mkdir(cache_dir)
-# set start_time to current time
-# to re-cache everything
-# upon application startup
-start_time = time.time()
-# configure the "sqlalchemy" cache region.
-cache_manager.regions['sql_cache_short'] = {
-        'type':'memory',
-        'data_dir':cache_dir,
-        'expire':10,
-        'start_time':start_time
-    }
-cache_manager.regions['sql_cache_med'] = {
-        'type':'memory',
-        'data_dir':cache_dir,
-        'expire':360,
-        'start_time':start_time
-    }
-cache_manager.regions['sql_cache_long'] = {
-        'type':'file',
-        'data_dir':cache_dir,
-        'expire':3600,
-        'start_time':start_time
-    }
+#Configured globally in .ini files
 #to use cache use this in query
 #.options(FromCache("sqlalchemy_cache_type", "cachekey"))