How to declare global variables for use in an addon that aren't stored in the blend file
The window manager

If you set up properties on the window manager using bpy.props they are available globally for the session, are not saved and revert to defaults on next.  PRO: simple to add a UI, a lot of UI for operators uses wm.

The driver namespace

The driver namespace can be leveraged.

class Foo:
    def __init__(self, x):
            self.x = x

dns = bpy.app.driver_namespace
dns["var"] = Foo(3)


then anywhere

global_var = dns.get("var") # None if not set


Make a module

from my_module import my_global_variable


Declare a global

max_something = 10000

def update(self, context):
    global max_something


Using lists and dictionaries here often removes the need for the global declaration.

Getter Setter on bpy.props

In example in question code, if using a global instead of using update would set up properties with a get set method. See docs.

As in this example, Internal &quot;get/set&quot; function of property?  

let the get or set methods retrieve or set your global respectively.  The set method is akin to an update in this scenario.