add cache logic for alliance info & did a lot of test to check whether the cache works well in multi-thread env.