Static variable equivalent ?

I think this article may help you understand more the rendering process so that you can figure out what is needed for your use case. Take a look