yes102098320Y
Convex Communityβ€’8mo agoβ€’
10 replies
yes102098320

Caching Expensive Database Query

Hi All,

I've been playing around trying to come to terms with Convex, its been a nice experience so far but I'm looking for some advice as I've tried finding the answer myself and am just going round in circles πŸ˜….

Essentially I have a database query that computes a very expensive operation due having to calculate time series and format it in a way that can be used.

Currently what I'm experiencing (Which i know is an expected outcome) is that the useQuery i have that takes in args is caching the result after the logic from the database is complete.

To get to my question;
Is it possible for me to somehow cache the expensive operation where it revalidates every hour (how often the data would update) but then utilise this cached value and expose a client end query where args are provided to limit the cached data?

I appreciate your time reading my essay πŸ˜…
Was this page helpful?