(cls)
return LRU(size)
A mapping from database names to registries.
A mapping from database names to registries.
A mapping from database names to registries .
def registries(cls):
        """ A mapping from database names to registries. """
        size = config.get('registry_lru_size', None)
        if not size:
            # Size the LRU depending of the memory limits
            if os.name != 'posix':
                # cannot specify the memory limit soft on windows...
                size = 42
            else:
                # A registry takes 10MB of memory on average, so we reserve
                # 10Mb (registry) + 5Mb (working memory) per registry
                avgsz = 15 * 1024 * 1024
                size = int(config['limit_memory_soft'] / avgsz)
        return LRU(size)
def registries ( cls ) : size = config . get ( 'registry_lru_size' , None ) if not size : # Size the LRU depending of the memory limits if os . name != 'posix' : # cannot specify the memory limit soft on windows... size = 42 else : # A registry takes 10MB of memory on average, so we reserve # 10Mb (registry) + 5Mb (working memory) per registry avgsz = 15 * 1024 * 1024 size = int ( config [ 'limit_memory_soft' ] / avgsz ) return LRU ( size )