1
0
mirror of synced 2024-11-24 06:20:12 +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, GameConstants,
RegionConstants, RegionConstants,
Time, Time,
cache,
) )
from bemani.data import Config, Data, Arcade, Machine, UserID, RemoteUser from bemani.data import Config, Data, Arcade, Machine, UserID, RemoteUser
@ -186,6 +187,10 @@ class Base(ABC):
self.config = config self.config = config
self.model = model 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 @classmethod
def create( def create(
cls, cls,