(self, api_name: str, schema: Dict, ttl_seconds: Optional[int])
Store an individual schema
Store an individual schema
Store an individual schema
async def store(self, api_name: str, schema: Dict, ttl_seconds: Optional[int]):
        """Store an individual schema"""
        with await self.connection_manager() as redis:
            schema_key = self.schema_key(api_name)

            p = redis.pipeline()
            p.set(schema_key, json_encode(schema))
            if ttl_seconds is not None:
                p.expire(schema_key, ttl_seconds)
            p.sadd(self.schema_set_key(), api_name)
            await p.execute()
async def store ( self , api_name : str , schema : Dict , ttl_seconds : Optional [ int ] ) : with await self . connection_manager ( ) as redis : schema_key = self . schema_key ( api_name ) p = redis . pipeline ( ) p . set ( schema_key , json_encode ( schema ) ) if ttl_seconds is not None : p . expire ( schema_key , ttl_seconds ) p . sadd ( self . schema_set_key ( ) , api_name ) await p . execute ( )