def get_cache_limit():
 if (sabnzbd.WIN32 or sabnzbd.DARWIN):
  return DEF_CACHE_LIMIT
 try:
  mem_bytes = ((os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')) / 4)
  if (mem_bytes > from_units(DEF_CACHE_LIMIT)):
   return DEF_CACHE_LIMIT
  elif (mem_bytes > from_units('32M')):
   return to_units(mem_bytes)
 except:
  pass
 return ''

def get_cache_limit ( ) : if ( sabnzbd . WIN32 or sabnzbd . DARWIN ) : return DEF_CACHE_LIMIT try : mem_bytes = ( ( os . sysconf ( 'SC_PAGE_SIZE' ) * os . sysconf ( 'SC_PHYS_PAGES' ) ) / 4 ) if ( mem_bytes > from_units ( DEF_CACHE_LIMIT ) ) : return DEF_CACHE_LIMIT elif ( mem_bytes > from_units ( '32M' ) ) : return to_units ( mem_bytes ) except : pass return ''
depending on os .