parameters: (cls)
return_statement: return LRU(size)
docstring: A mapping from database names to registries.
docstring_summary: A mapping from database names to registries.
docstring_tokens: A mapping from database names to registries .
function: 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)
function_tokens: 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 )