Aeros.caching
¶
This module contains features for server-side and client-side caching.
Submodules¶
Package Contents¶
Classes¶
The most basic cache that requires no set-up and no arguments. |
|
Stores cached responses on the file system, |
|
An alias for FileSystemCache |
|
A Redis client to store responses on an external Redis server. |
|
This class manipulates the Cache-Control header in all responses sent from an endpoint |
|
An enum to replace the cache option strings with variables for auto-complete in most IDEs. |
-
class
Aeros.caching.
SimpleCache
(app: Optional[Flask] = None, with_jinja2_ext: bool = True, config=None)[source]¶ Bases:
flask_caching.Cache
The most basic cache that requires no set-up and no arguments.
-
class
Aeros.caching.
FileSystemCache
(app: Optional[Flask] = None, with_jinja2_ext: bool = True, config=None)¶ Bases:
flask_caching.Cache
Stores cached responses on the file system, good for huge caches that don’t fit into memory.
-
class
Aeros.caching.
FilesystemCache
[source]¶ An alias for FileSystemCache
Warning
This class is deprecated! Use FileSystemCache instead.
-
class
Aeros.caching.
RedisCache
(app: Optional[Flask] = None, with_jinja2_ext: bool = True, config=None)[source]¶ Bases:
flask_caching.Cache
A Redis client to store responses on an external Redis server.
-
class
Aeros.caching.
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¶
-