I'm working on a game server matchmaking and I have a room object which has a range that has two field and other extra fields :
min_score = IntegerField (help = 'minimum score that user should have to join this room.')
max_score = IntegerField (help = 'maximum score that a user can have to join this room.')
I'm going to cache this object and then if a user requests to join a room with a range that users can join. Is there a way that I can do something like below query on redis-cache?
Room.objects.filter(min_score__lte=user.score, max_score__gte=user.score)
I already have some algorithms that should do .get('key')
n
times.
But I wonder if there's a better solution.