def get_collection_by_id(collection_id, strict=True, version=None):
 collection_memcache_key = _get_collection_memcache_key(collection_id, version=version)
 memcached_collection = memcache_services.get_multi([collection_memcache_key]).get(collection_memcache_key)
 if (memcached_collection is not None):
  return memcached_collection
 else:
  collection_model = collection_models.CollectionModel.get(collection_id, strict=strict, version=version)
  if collection_model:
   collection = get_collection_from_model(collection_model)
   memcache_services.set_multi({collection_memcache_key: collection})
   return collection
  else:
   return None

def get_collection_by_id ( collection_id , strict = True , version = None ) : collection_memcache_key = _get_collection_memcache_key ( collection_id , version = version ) memcached_collection = memcache_services . get_multi ( [ collection_memcache_key ] ) . get ( collection_memcache_key ) if ( memcached_collection is not None ) : return memcached_collection else : collection_model = collection_models . CollectionModel . get ( collection_id , strict = strict , version = version ) if collection_model : collection = get_collection_from_model ( collection_model ) memcache_services . set_multi ( { collection_memcache_key : collection } ) return collection else : return None
returns a domain object representing a collection .