Get token and data from Redis

def get_cache_token(self, token):
        """ Get token and data from Redis """

        if self.conn is None:
            raise CacheException('Redis is not connected')

        token_data = self.conn.get(token)
        token_data = json.loads(token_data) if token_data else None

        return token_data