@cache.memoize(timeout=86400)
def token_valid(token_):
    if (len(token_) != 32):
        return False
    (row, data) = mysql.exec('SELECT * FROM `api`.`ptboard_token` WHERE token = %s', token_, ret_row=True)
    if (row > 0):
        return True
    else:
        return False
@cache.memoize(timeout=86400)
def token_valid(token_):
    if (len(token_) != 32):
        return False
    (row, data) = mysql.exec('SELECT * FROM `api`.`ptboard_token` WHERE token = %s', token_, ret_row=True)
    if (row > 0):
        return True
    else:
        return False