code: def set(self, subject_id, entity_id, info, timestamp=0):
          
  
          if isinstance(timestamp, datetime) or isinstance(timestamp,
                                                           time.struct_time):
              timestamp = time.strftime(TIME_FORMAT, timestamp)
  
          doc = {"subject_id": subject_id,
                 "entity_id": entity_id,
                 "info": info,
                 "timestamp": timestamp}
  
          _ = self._cache.insert(doc)
docs: Stores session information in the cache. Assumes that the subject_id
          is unique within the context of the Service Provider.
  
          :param subject_id: The subject identifier
          :param entity_id: The identifier of the entity_id/receiver of an
              assertion
          :param info: The session info, the assertion is part of this
          :param timestamp: A time after which the assertion is not valid.