-
-def set_contents_file_id(file):
- global content_file_id_cache
-
- if not content_file_id_cache.has_key(file):
- # since this can be called within a transaction, we can't use currval
- q = projectB.query("INSERT INTO content_file_names VALUES (DEFAULT, '%s') RETURNING id" % (file))
- content_file_id_cache[file] = int(q.getresult()[0][0])
- return content_file_id_cache[file]
-
-################################################################################
-
-def set_contents_path_id(path):
- global content_path_id_cache
-
- if not content_path_id_cache.has_key(path):
- q = projectB.query("INSERT INTO content_file_paths VALUES (DEFAULT, '%s') RETURNING id" % (path))
- content_path_id_cache[path] = int(q.getresult()[0][0])
- return content_path_id_cache[path]
-
-################################################################################
-
-def insert_content_path(bin_id, fullpath):
- global insert_contents_file_cache
- cache_key = "%s_%s" % (bin_id, fullpath)
+def cache_content_path(fullpath):
+ global content_file_cache, contents_name_cache, content_path_cache
+ global content_path_file, content_name_file, has_opened_temp_file_lists