code: def cache(self, con):
          
          try:
              if self._reset == 2:
                  con.reset()  # reset the connection completely
              else:
                  if self._reset or con._transaction:
                      try:
                          con.rollback()  # rollback a possible transaction
                      except Exception:
                          pass
              self._cache.put(con, 0)  # and then put it back into the cache
          except Full:
              con.close()
          if self._connections:
              self._connections.release()
docs: Put a connection back into the pool cache.