Skip to content
Back

Function global variables

  • 0
  • 1
  • Self Hosted
  • Functions
17 Jun, 2026, 00:38

when i create a top-level global variable in go or bun how will it behave? is the heap getting renewed on every execution or could i do some kind of temp. caching with it?

TL;DR
Top-level global variables in Go and Bun have persistent values and are not reinitialized on every execution. They can be used for temporary caching.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more