Aeros.caching.client
¶
This module contains features for client-side caching using the Cache-Control header.
Module Contents¶
Classes¶
An enum to replace the cache option strings with variables for auto-complete in most IDEs. |
|
This class manipulates the Cache-Control header in all responses sent from an endpoint |
-
class
Aeros.caching.client.
CacheTypes
¶ Bases:
enum.Enum
An enum to replace the cache option strings with variables for auto-complete in most IDEs.
-
NO_CACHE
= no-cache¶
-
NO_STORE
= no-store¶
-
PUBLIC
= public¶
-
PRIVATE
= private¶
-
-
class
Aeros.caching.client.
CacheControl
(cache_type: Aeros.caching.client.CacheTypes, max_age: int = None, immutable: bool = False, no_transform: bool = False, stale_while_revalidate: int = None, stale_if_error: bool = False, cache_on_status: list = [200])¶ This class manipulates the Cache-Control header in all responses sent from an endpoint decorated with this class.
Hint
If you need conditional caching rules you may still use response from quart to manipulate the Cache-Control header to your needs.
-
__call__
(self, f: callable) → callable¶
-