1
0
mirror of synced 2024-11-23 22:10:59 +01:00

Provide a convenience wrapper to the cache global.

This commit is contained in:
Jennifer Taylor 2023-08-13 19:22:49 +00:00
parent a10350fb62
commit 5c598508b4

View File

@ -11,6 +11,7 @@ from bemani.common import (
GameConstants,
RegionConstants,
Time,
cache,
)
from bemani.data import Config, Data, Arcade, Machine, UserID, RemoteUser
@ -186,6 +187,10 @@ class Base(ABC):
self.config = config
self.model = model
# Provided purely for convenience. You can also import cache directly from bemani.common
# in order to use the object for decorators such as @cache.memoize.
self.cache = cache
@classmethod
def create(
cls,