CacheManager/FlushTables, fix checkall function