Module design with session based variable

I have a few functions which call each other recursively. Some of these functions rely on an object in the session which provides caching functionality.

With binary cmdlets, we have SessionState.PSVariable.{Set|GetValue} etc. With a text based module, what is the best approach?

A module-level variable.

https://powershell.org/forums/topic/powershell-module-maintain-session-information-globally/

Thanks guys,
So what does PrivateData (with all the limitations) actually provide over and above simple, non exported variables in the module file?