Singleton in Functions

%3CLINGO-SUB%20id%3D%22lingo-sub-1833809%22%20slang%3D%22en-US%22%3ESingleton%20in%20Functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1833809%22%20slang%3D%22en-US%22%3E%3CP%3EQuick%20question%2C%20is%20there%20any%20best%20practice%20to%20maintain%20an%20object%20with%20static%20information%20so%20that%20i%20dont%20have%20to%20repopulate%20on%20each%20fn%20call%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%20maybe%20this%20is%20explained%20in%20the%20docs%2C%20just%20point%20me%20to%20where%20to%20look.%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1835849%22%20slang%3D%22en-US%22%3ERe%3A%20Singleton%20in%20Functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1835849%22%20slang%3D%22en-US%22%3EYes%20you%20can%20do%20this.%20What%20language%20are%20you%20using%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1837109%22%20slang%3D%22en-US%22%3ERe%3A%20Singleton%20in%20Functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1837109%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F185703%22%20target%3D%22_blank%22%3E%40Anthony%20Chu%3C%2FA%3E%26nbsp%3B%2C%20using%20c%23%20over%20AzFun%20on%20windows%20host.%20thxs%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Quick question, is there any best practice to maintain an object with static information so that i dont have to repopulate on each fn call?

 

Sorry maybe this is explained in the docs, just point me to where to look. 

Thanks

2 Replies
Yes you can do this. What language are you using?

@Anthony Chu , using c# over AzFun on windows host.

(in our webapi solution we have a singleton object which mantains some configuration information and data related to tenants, nothing stateful but save us some time during execution)

thxs