docs: def cache(self, con):
          """Put a dedicated connection back into the idle cache."""
          self._lock.acquire()
          try:
              if not self._maxcached or len(self._idle_cache) < self._maxcached:
                  con._reset(force=self._reset)  # rollback possible transaction
                  # the idle cache is not full, so put it there
                  self._idle_cache.append(con)  # append it to the idle cache
              else:  # if the idle cache is already full,
                  con.close()  # then close the connection
              self._connections -= 1
              self._lock.notify()
          finally:
              self._lock.release()