drizzle best practices for create drizzle instance
From this example, is it a good practice to create the
db
every time or should I cache?
I’m coming from a Java world where caching and connection pooling is the way to go.
But I understand CF is cloud solution and this might be different.
I could create that db
in middleware and make it available via locals
, but is that smart in terms of costs?
Having an endpoint that does not access the d1 database will construct it then… should I make it lazy or something in locals
?
1 Reply
Was about to ask the same thing! Looking forward to the response...