From 5c598508b47335906871acd1e8c786fd021b0fd1 Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Sun, 13 Aug 2023 19:22:49 +0000 Subject: [PATCH] Provide a convenience wrapper to the cache global. --- bemani/backend/base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bemani/backend/base.py b/bemani/backend/base.py index 3b7b137..ff50548 100644 --- a/bemani/backend/base.py +++ b/bemani/backend/base.py @@ -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,