code: def save(self, set_cookie, **params):
          
          if set(self.store.items()) ^ set(self.items()):
              value = dict(self.items())
              value = json.dumps(value)
              value = self.encrypt(value)
              if not isinstance(value, str):
                  value = value.encode(self.encoding)
              set_cookie(self.key, value, **self.params)
              return True
          return False
docs: Update cookies if the session has been changed.