code: def gc(self):
          
          manifest = []
          overlimit = len(self.data) - self.maxsize \
              if self.maxsize is not None else 0
          now = self.ttl is not None and self.timer()
          for key, entry in self.data.items():
              if overlimit > 0 or (now and self.is_expired(entry, time=now)):
                  overlimit -= 1
                  manifest.append(key)
              else:
                  break
          for x in manifest:
              del self.data[x]
docs: Garbage collect overflow and/or aged entries.