A custom cache backend for Flask-Caching based on Minio. Usable for applications like Superset as a cache backend out of the box.
Project description
Minio Cache
A custom cache backend for Flask-Caching based on Minio. Usable for applications like Superset as a cache backend out of the box.
Installation
Simply install with pip !
pip install minio-flask-cache
Usage
Classic flask app
from flask import Flask
from flask_caching import Cache
app = Flask(__name__)
app.config['CACHE_TYPE'] = 'path.to.MinioCacheBackend'
app.config['CACHE_MINIO_ENDPOINT'] = 'localhost:9000'
app.config['CACHE_MINIO_ACCESS_KEY'] = 'minioadmin'
app.config['CACHE_MINIO_SECRET_KEY'] = 'minioadmin'
app.config['CACHE_MINIO_BUCKET'] = 'flask-cache'
app.config['CACHE_MINIO_SECURE'] = False # Set to True for HTTPS
app.config['CACHE_DEFAULT_TIMEOUT'] = 300
cache = Cache(app)
Superset cache backend
See Superset Docs for more details on superset cache backends.
Edit superset_config.py to add/edit the CACHE_CONFIG dict.
Config can be used for all cache configurations (FILTER_STATE_CACHE_CONFIG, EXPLORE_FORM_DATA_CACHE_CONFIG, CACHE_CONFIG and DATA_CACHE_CONFIG)
CACHE_CONFIG = {
"CACHE_TYPE": "MinioCacheBackend",
"CACHE_MINIO_ENDPOINT": "localhost:9000",
"CACHE_MINIO_ACCESS_KEY": "minioadmin",
"CACHE_MINIO_SECRET_KEY": "minioadmin",
"CACHE_MINIO_BUCKET": "superset",
"CACHE_MINIO_SECURE": False # Set to True for HTTPS,
"CACHE_DEFAULT_TIMEOUT": 300,
"CACHE_KEY_PREFIX": "superset_"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minio_flask_cache-0.0.1.tar.gz.
File metadata
- Download URL: minio_flask_cache-0.0.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0648b9723e03b2cbddf01d40c213508b4d10ce4f665b9a86803d9eaffd60b3dc
|
|
| MD5 |
93a376a7945f8f2d3aa5833a0f0fae78
|
|
| BLAKE2b-256 |
2cc10f058c3226318b29883195dd07132be30748df1220b38a0e4f2c9afab8a1
|
File details
Details for the file minio_flask_cache-0.0.1-py3-none-any.whl.
File metadata
- Download URL: minio_flask_cache-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fba94e7884efb8015ebe25d48f40cf8b433d4050527b7e01e3ab6240cc9793ca
|
|
| MD5 |
aff99088aa5d48607754704f2cc45f53
|
|
| BLAKE2b-256 |
387520e2867c29b279487c3077b488771baeff46267512d3d6c0be368261d597
|