def getCacheByName(name):
 if (name.lower() == 'test'):
  return Test
 elif (name.lower() == 'disk'):
  return Disk
 elif (name.lower() == 'multi'):
  return Multi
 elif (name.lower() == 'memcache'):
  return Memcache.Cache
 elif (name.lower() == 'redis'):
  return Redis.Cache
 elif (name.lower() == 's3'):
  return S3.Cache
 raise Exception(('Unknown cache name: "%s"' % name))

def getCacheByName ( name ) : if ( name . lower ( ) == 'test' ) : return Test elif ( name . lower ( ) == 'disk' ) : return Disk elif ( name . lower ( ) == 'multi' ) : return Multi elif ( name . lower ( ) == 'memcache' ) : return Memcache . Cache elif ( name . lower ( ) == 'redis' ) : return Redis . Cache elif ( name . lower ( ) == 's3' ) : return S3 . Cache raise Exception ( ( 'Unknown cache name: "%s"' % name ) )
retrieve a cache object by name .