Skip to content

Rethinking Shared Data #115

@bknoles

Description

@bknoles

Continuing the conversation from #108

A quick summary:

  • The combination of "module level" shared data storage, and "controller level" setters for shared data has introduced tricky bugs including shared data leaking across threads and across requests.
  • While we've patched these issues, it'd be great to refactor away from global shared state.
  • Controller class variables have been suggested in the past.
  • I'm wary of using controller class variables, since in production they are also a form of global shared state.
  • @PedroAugustoRamalhoDuarte has put together Refactor inertia share to use instance variables #111 , which refactors inertia shared state into instance variables. These are set via before_action callbacks, called by inertia_share.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions