Falcon v3.0.0-b1 Documentation(Press CTRL+C to quit) INFO: Waiting for application startup. INFO: Application startup complete. Let’s verify it works by trying to access the URL provided above by uvicorn: $ http http://127 redis_host = self.DEFAULT_REDIS_HOST self.uuid_generator = Config.DEFAULT_UUID_GENERATOR A complete Redis cache component (cache.py) could look like: import msgpack class RedisCache: PREFIX resp, data): resp.content_type, resp.data = msgpack.unpackb(data, raw=False) resp.complete = True resp.context.cached = True async def process_startup(self, scope, event):0 码力 | 1028 页 | 725.86 KB | 1 年前3
Falcon v3.0.0 Documentation(Press CTRL+C to quit) INFO: Waiting for application startup. INFO: Application startup complete. We can verify it works by trying to access the URL provided above by uvicorn: $ http http://127 redis_host = self.DEFAULT_REDIS_HOST self.uuid_generator = Config.DEFAULT_UUID_GENERATOR Let’s complete the Redis cache component by implementing two more middleware methods, in addition to process_startup() resp, data): resp.content_type, resp.data = msgpack.unpackb(data, raw=False) resp.complete = True resp.context.cached = True async def process_startup(self, scope, event):0 码力 | 1055 页 | 739.30 KB | 1 年前3
Falcon v3.0.1 Documentation(Press CTRL+C to quit) INFO: Waiting for application startup. INFO: Application startup complete. We can verify it works by trying to access the URL provided above by uvicorn: $ http http://127 redis_host = self.DEFAULT_REDIS_HOST self.uuid_generator = Config.DEFAULT_UUID_GENERATOR Let’s complete the Redis cache component by implementing two more middleware methods, in addition to process_startup() resp, data): resp.content_type, resp.data = msgpack.unpackb(data, raw=False) resp.complete = True resp.context.cached = True async def process_startup(self, scope, event):0 码力 | 1058 页 | 741.59 KB | 1 年前3
Falcon v3.0.0-b2 Documentation(Press CTRL+C to quit) INFO: Waiting for application startup. INFO: Application startup complete. We can verify it works by trying to access the URL provided above by uvicorn: $ http http://127 redis_host = self.DEFAULT_REDIS_HOST self.uuid_generator = Config.DEFAULT_UUID_GENERATOR Let’s complete the Redis cache component by implementing two more middleware methods, in addition to process_startup() resp, data): resp.content_type, resp.data = msgpack.unpackb(data, raw=False) resp.complete = True resp.context.cached = True async def process_startup(self, scope, event):0 码力 | 1041 页 | 730.21 KB | 1 年前3
Falcon v3.0.0-b2 Documentation0.1:8000 (Press CTRL+C to quit) INFO: Waiting for application startup. INFO: Application startup complete. We can verify it works by trying to access the URL provided above by uvicorn: $ http http://127 redis_host = self.DEFAULT_REDIS_HOST self.uuid_generator = Config.DEFAULT_UUID_GENERATOR Let’s complete the Redis cache component by implementing two more middleware methods, in addition to process_startup() _deserialize_response(self, resp, data): resp.content_type, resp.data = msgpack.unpackb(data, raw=False) resp.complete = True resp.context.cached = True async def process_startup(self, scope, event): if self._redis0 码力 | 340 页 | 1.15 MB | 1 年前3
Falcon v3.0.0 Documentation0.1:8000 (Press CTRL+C to quit) INFO: Waiting for application startup. INFO: Application startup complete. We can verify it works by trying to access the URL provided above by uvicorn: $ http http://127 redis_host = self.DEFAULT_REDIS_HOST self.uuid_generator = Config.DEFAULT_UUID_GENERATOR Let’s complete the Redis cache component by implementing two more middleware methods, in addition to process_startup() _deserialize_response(self, resp, data): resp.content_type, resp.data = msgpack.unpackb(data, raw=False) resp.complete = True resp.context.cached = True async def process_startup(self, scope, event): if self._redis0 码力 | 344 页 | 1.16 MB | 1 年前3
Falcon v3.0.1 Documentation0.1:8000 (Press CTRL+C to quit) INFO: Waiting for application startup. INFO: Application startup complete. We can verify it works by trying to access the URL provided above by uvicorn: $ http http://127 redis_host = self.DEFAULT_REDIS_HOST self.uuid_generator = Config.DEFAULT_UUID_GENERATOR Let’s complete the Redis cache component by implementing two more middleware methods, in addition to process_startup() _deserialize_response(self, resp, data): resp.content_type, resp.data = msgpack.unpackb(data, raw=False) resp.complete = True resp.context.cached = True async def process_startup(self, scope, event): if self._redis0 码力 | 344 页 | 1.16 MB | 1 年前3
Falcon v3.0.0-b1 Documentation0.1:8000 (Press CTRL+C to quit) INFO: Waiting for application startup. INFO: Application startup complete. Let’s verify it works by trying to access the URL provided above by uvicorn: $ http http://127 self.redis_host = self.DEFAULT_REDIS_HOST self.uuid_generator = Config.DEFAULT_UUID_GENERATOR A complete Redis cache component (cache.py) could look like: import msgpack class RedisCache: PREFIX = 'asgilook:' _deserialize_response(self, resp, data): resp.content_type, resp.data = msgpack.unpackb(data, raw=False) resp.complete = True resp.context.cached = True async def process_startup(self, scope, event): if self._redis0 码力 | 338 页 | 1.14 MB | 1 年前3
Falcon v3.1.1-b3 Documentation0.1:8000 (Press CTRL+C to quit) INFO: Waiting for application startup. INFO: Application startup complete. We can verify it works by trying to access the URL provided above by uvicorn: $ http http://127 redis_host = self.DEFAULT_REDIS_HOST self.uuid_generator = Config.DEFAULT_UUID_GENERATOR Let’s complete the Redis cache component by implementing two more middleware methods, in addition to process_startup() _deserialize_response(self, resp, data): resp.content_type, resp.data = msgpack.unpackb(data, raw=False) resp.complete = True resp.context.cached = True async def process_startup(self, scope, event): await self._redis0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-b1 Documentation0.1:8000 (Press CTRL+C to quit) INFO: Waiting for application startup. INFO: Application startup complete. We can verify it works by trying to access the URL provided above by uvicorn: $ http http://127 redis_host = self.DEFAULT_REDIS_HOST self.uuid_generator = Config.DEFAULT_UUID_GENERATOR Let’s complete the Redis cache component by implementing two more middleware methods, in addition to process_startup() _deserialize_response(self, resp, data): resp.content_type, resp.data = msgpack.unpackb(data, raw=False) resp.complete = True resp.context.cached = True async def process_startup(self, scope, event): await self._redis0 码力 | 378 页 | 1.29 MB | 1 年前3
共 40 条
- 1
- 2
- 3
- 4













