You should assume it may not be retained as invocations may not share the same underlying context.

You should assume it may not be retained as invocations may not share the same underlying context.

But that’s orthogonal to my advice: there should be no measurable performance benefit to trying to “memoize” a binding like that - D1 doesn’t have the heavy connection setup that a traditional database does. Same goes for other bindings.
Was this page helpful?