~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/apps/filesystem.py

  • Committer: Michael Hudson
  • Date: 2009-04-27 03:22:23 UTC
  • mfrom: (332.2.8 persist-_rev_info)
  • Revision ID: michael.hudson@canonical.com-20090427032223-trt8by0ec3njgk5m
add the ability to cache the wholehistory data to disk as well as RAM.
cache a much smaller amount of wholehistory data in RAM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
class BranchesFromFileSystemRoot(object):
72
72
 
73
73
    def __init__(self, folder, config):
74
 
        self.graph_cache = lru_cache.LRUCache()
 
74
        self.graph_cache = lru_cache.LRUCache(10)
75
75
        self.folder = folder
76
76
        self._config = config
77
77
 
94
94
class UserBranchesFromFileSystemRoot(object):
95
95
 
96
96
    def __init__(self, folder, config):
97
 
        self.graph_cache = lru_cache.LRUCache()
 
97
        self.graph_cache = lru_cache.LRUCache(10)
98
98
        self.folder = folder
99
99
        self._config = config
100
100
        self.trunk_dir = config.get_option('trunk_dir')