Canner / WrenAI

🚀 An open-source SQL AI (Text-to-SQL) Agent that empowers data, product teams to chat with their data. 🤘
https://getwren.ai/oss
GNU Affero General Public License v3.0
2.04k stars 211 forks source link

feat(wren-ai-service): Support TTL for query cache #661

Closed paopa closed 2 months ago

paopa commented 2 months ago

This PR introduces query caching and performance improvements across multiple services and configurations, utilizing the cachetools library.

Changes:

  1. Added new environment variable:
    • QUERY_CACHE_TTL (default: 3600 seconds)

About cachetools

Key features of cachetools used in this PR:

These changes aim to improve caching efficiency and overall performance across various services by implementing time-based caching with configurable time-to-live (TTL) values.

See https://github.com/tkem/cachetools for more details.