Module design with session based variable

This topic contains 3 replies, has 3 voices, and was last updated by  Ritmo2k 4 months, 2 weeks ago.

  • Author
    Posts
  • #68173

    Ritmo2k
    Participant

    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?

  • #68175

    Don Jones
    Keymaster

    A module-level variable.

  • #68196

    Rob Simmers
    Participant
  • #68211

    Ritmo2k
    Participant

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

You must be logged in to reply to this topic.