#!/usr/bin/python
# -*- coding: UTF-8 -*-

import config

from functions import redis_cache

@redis_cache( 3600 )
def get_account_type_id_name():
    account_type_id_name = {}
    
    sql = "SELECT id, name FROM account_type"
    for at in config.db.query_fetchall( sql ):
        account_type_id_name[ at[ "id" ] ] = at[ "name" ]
    
    return account_type_id_name
