docs: def get_cached_data(self, url):
          """ get cached data for a url if stored in the cache and not outdated
          
          Args:
              url: URL for the Ensembl REST service
          
          Returns:
              data if data in cache, else None
          """
          
          key = self.get_key_from_url(url)
          
          with self.conn as conn:
              cursor = conn.cursor()
              cursor.execute("SELECT * FROM ensembl WHERE key=? AND genome_build=?",
                  (key, self.genome_build))
          row = cursor.fetchone()
          
          # if the data has been cached, check that it is not out of date, and
          # the data was generated from the same Ensembl API version
          if row is not None:
              api_version = row["api_version"]
              data = zlib.decompress(row["data"])
              if IS_PYTHON3:
                  data = data.decode("utf-8")
              
              date = datetime.strptime(row["cache_date"], "%Y-%m-%d")
              diff = self.today - date
              
              if diff.days < 180 and self.api_version == api_version:
                  return data
          
          return None