# Path: objects/glob.py
# 		VERSION = f.read().strip()
# 	VERSION = "Unknown"
# ACHIEVEMENTS_VERSION = 1
# DATADOG_PREFIX = "lets"


from common.log import logUtils as log
from common.ripple import userUtils
from objects import glob
import json

class userStatsCache:
	def get(self, userID, gameMode):
		"""
		Get cached user stats from redis.
		If user stats are not cached, they'll be read from db, cached and returned

		:param userID: userID
		:param gameMode: game mode number
		:return: userStats dictionary (rankedScore, totalScore, pp, accuracy, playcount)
		"""

# Path: objects/glob.py
# 		VERSION = f.read().strip()
# 	VERSION = "Unknown"
# ACHIEVEMENTS_VERSION = 1
# DATADOG_PREFIX = "lets"


# Path: userStatsCache.py
from common.log import logUtils as log
from common.ripple import userUtils
from objects import glob
import json


class userStatsCache:
	def get(self, userID, gameMode):
		"""
		Get cached user stats from redis.
		If user stats are not cached, they'll be read from db, cached and returned

		:param userID: userID
		:param gameMode: game mode number
		:return: userStats dictionary (rankedScore, totalScore, pp, accuracy, playcount)
		"""

		data = glob.redis.get("lets:user_stats_cache:{}:{}".format(gameMode, userID))