Improve dict_keys in cache db