var manager = new MyManager(db);
console.log('initialize'); // this initialize log
exports.something1 = functions.database.ref(path1') .onWrite(event => { return manager.doSome1(event); });
exports.something2 = functions.database.ref('path2') .onWrite(event => { return manager.doSome2(event); }); Two different functions will *never* share infrastructure, but a single function may reuse an existing instance for multiple invocations to avoid cold start time. You cannot make any assumptions about when reuse happens -- it is automated and based on a large number of factors.
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/df56e904-53b3-41ab-8638-f86ac265d8e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.