@classmethod
  def MemcacheWrappedGetAllFilter(
      cls, filters=(), limit=1000, memcache_secs=MEMCACHE_SECS):
    filter_str = '|'.join(map(lambda x: '_%s,%s_' % (x[0], x[1]), filters))
    memcache_key = 'mwgaf_%s%s' % (cls.kind(), filter_str)

    entities = memcache.get(memcache_key)
    if entities is None:
      query = cls.all()
      for filt, value in filters:
        query = query.filter(filt, value)
      entities = query.fetch(limit)
      memcache.set(memcache_key, entities, memcache_secs)

    return entities
Fetches all entities for a filter set, wrapped by Memcache.
dataset/ETHPy150Open google/simian/src/simian/mac/models/base.py/BaseModel.MemcacheWrappedGetAllFilter