Skip to content

Convert GlobalCache to its own class #2385

Description

@Wires77

In general, Common.lua should be for functions that can be used on any table or number or other type. Many of these functions there are very specific to the GlobalCache. A few options I'd rather see

  1. Make the functions more generic (e.g. for mergeDB here, have it be mergeTables and call it twice for conditions and multipliers)
  2. Move the functions to a separate file specifically for managing the GlobalCache (might be worth turning GlobalCache into a proper OO class potentially)
  3. Some of the functions are only used in one place. It might be better off having those functions in the file that uses them either as a local function or a function defined in that file instead of polluting the global namespace

Originally posted by @Wires77 in #2294 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    technicalHidden from release notes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions