How would I force a rerun of a query done through an
For the time being I am bypassing the default query, and implementing a query (
Foo) with a
@cache_data decorator, for which I call
Any better ideas on how to do this?
Thanks for posting!
I think your idea is good unless you have a very specific use case in mind.
You can add a
ttl value of
0 to the query function like below that way no data is cached. You can adjust the time to live as much as needed to expire your cache.
def query(self, query: str, ttl: int = 0, **kwargs) -> pd.DataFrame:
def _query(query: str, **kwargs) -> pd.DataFrame:
cursor = self.cursor()
return _query(query, **kwargs)
I hope this helps.