# 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 import generalUtils
from objects import glob

class cacheMiss(Exception):
	pass

class personalBestCache:
	def get(self, userID, fileMd5, country=False, friends=False, mods=-1, relax=False):
		"""
		Get cached personal best rank

		:param userID: userID
		:param fileMd5: beatmap md5
		:param country: True if country leaderboard, otherwise False
		:param friends: True if friends leaderboard, otherwise False
		:param relax: True if relax leaderboard, False if classic leaderboard
		:param mods: leaderboard mods
		:return: 0 if cache miss, otherwise rank number
		"""
		try:
			# Make sure the value is in cache

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


# Path: personalBestCache.py
from common.log import logUtils as log
from common import generalUtils
from objects import glob


class cacheMiss(Exception):
	pass

class personalBestCache:
	def get(self, userID, fileMd5, country=False, friends=False, mods=-1, relax=False):
		"""
		Get cached personal best rank

		:param userID: userID
		:param fileMd5: beatmap md5
		:param country: True if country leaderboard, otherwise False
		:param friends: True if friends leaderboard, otherwise False
		:param relax: True if relax leaderboard, False if classic leaderboard
		:param mods: leaderboard mods
		:return: 0 if cache miss, otherwise rank number
		"""
		try:
			# Make sure the value is in cache

			data = glob.redis.get("lets:personal_best_cache:{}".format(userID))