Provide a convenience wrapper to the cache global.
This commit is contained in:
parent
a10350fb62
commit
5c598508b4
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user