vban-cmd-python/vbancmd/util.py
onyx-and-iris 6c914dafbe add login,logout, caching system, dirty parameter to base class
add login, logout functions to base class.

add caching to setters and fetch caching to getters.

add isdirty function to rt packet dataclass for defining dirty flag.

remove sync kwarg.
2022-03-20 12:25:50 +00:00

8 lines
233 B
Python

def cache(func):
""" check if recently cached was an updated value """
def wrapper(*args, **kwargs):
# setup cache check
res = func(*args, **kwargs)
# update cache
return res
return wrapper