Spotrix
GitHubBlogs
  • Welcome to Spotrix!
  • Installing
    • Installing
    • Upgrading
  • Configuration
    • Basic configuration
    • Custom configuration
    • Caching
    • Connection to databases
      • Guinsoo 💎
      • Apache Pinot
      • Apache Presto
      • Trino
      • Apache Druid
      • ClickHouse
      • MindsDB
      • DuckDB
  • Creating Charts
    • Creating your charts
    • Creating your dashboard
    • Explore your data
  • Ecosystem
    • Data Ecosystem
    • Semantic Layer
  • Solutions
    • Financial Services
    • Next-Gen BI
  • Appendix
    • Contribute
    • Security
    • FAQs
Powered by GitBook
On this page

Was this helpful?

  1. Configuration

Caching

PreviousCustom configurationNextConnection to databases

Last updated 2 years ago

Was this helpful?

Spotrix uses for caching purposes. Flask-Caching supports various caching backends, including Redis (recommended), Memcached, SimpleCache (in-memory), or the local filesystem. are also supported.

Caching can be configured by providing a dictionaries in spotrix_config.py that comply with .

The following cache configurations can be customized in this way:

  • Dashboard filter state: FILTER_STATE_CAHCE_CONFIG required

  • Explore chart from data: EXPLORE_FROM_DATA_CACHE_CONFIG required

  • Metadata cache: CACHE_CONFIG optional

  • Charting data required from datasets: DATA_CACHE_CONFIG optional

For example, to configure the filter state cache using redis:

FILTER_STATE_CACHE_CONFIG = {
    'CACHE_TYPE': 'RedisCache',
    'CACHE_DEFAULT_TIMEOUT': 86400,
    'CACHE_KEY_PREFIX': 'spotrix_filter_cache',
    'CACHE_REDIS_URL': 'redis://localhost:6379/0'
}
Flask-Caching
Custom cache backends
the Flask-Caching config specifications