Commit aea5eb4e authored by Chen Bill's avatar Chen Bill

clear cache when info_location changes

parent 2222c76a
......@@ -146,8 +146,14 @@ int32 card::get_infos(byte* buf, uint32 query_flag, int32 use_cache) {
++p;
}
if (query_flag & QUERY_POSITION) {
*p = get_info_location();
uint32 tdata = get_info_location();
*p = tdata;
++p;
if (q_cache.info_location != tdata) {
std::memset(&q_cache, 0xff, sizeof(query_cache));
q_cache.info_location = tdata;
use_cache = 0;
}
}
if(!use_cache) {
if (query_flag & QUERY_ALIAS) {
......
......@@ -76,7 +76,7 @@ struct card_state {
};
struct query_cache {
uint32 data_code;
uint32 info_location;
uint32 current_code;
uint32 type;
uint32 level;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment