evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
3.38k stars 163 forks source link

QueryStore cache grows indefinetly #1900

Closed ItsMeBrianD closed 2 weeks ago

ItsMeBrianD commented 3 weeks ago

QueryStore caches every query that comes through the pipeline (this is to maintain a strict 1-1 between SQL Strings & QueryStores to prevent extra work)

We should start to trim from the cache once it gets to a certain size, to make sure that we don't explode users' memory.

There have been a few prototypes of this feature, but the gist of it is:

Some considerations to be made:

This also needs to be reflected on the new SDK Query, which is set to be included in an upcoming release

ItsMeBrianD commented 3 weeks ago

This should be resolved once #1818 is merged