code: def get_github_cache(self, kind, key_):
          
  
          cache = {}
          res_size = 100  # best size?
          from_ = 0
  
          index_github = "github/" + kind
  
          url = self.elastic.url + "/" + index_github
          url += "/_search" + "?" + "size=%i" % res_size
          r = self.requests.get(url)
          type_items = r.json()
  
          if 'hits' not in type_items:
              logger.info("No github %s data in ES" % (kind))
  
          else:
              while len(type_items['hits']['hits']) > 0:
                  for hit in type_items['hits']['hits']:
                      item = hit['_source']
                      cache[item[key_]] = item
                  from_ += res_size
                  r = self.requests.get(url + "&from=%i" % from_)
                  type_items = r.json()
                  if 'hits' not in type_items:
                      break
  
          return cache
docs: Get cache data for items of _type using key_ as the cache dict key