It is, in fact, best practice to cache things like SQL connections. That's regardless of language; here I'm doing the same in Go for example.
With regards to caching content to avoid hitting DBs/other services, I would say, yes, if the content is expensive to access and requested often enough i.e. the same execution environment ('function instance') will be asked for it multiple times, it's definitely worth it.
N.B. Since the typical way to do this is using global state, thread safety needs to be taken into account where appropriate