How exactly does datasets versioning work?

I ran the required command:

datasets-cli test .\datasets\hebban-reviews\ --save_infos --all_configs  

which re-used cache and did not download the newly committed (and pushed) data files. Does the cache also compare commits, or just checks whether it is the same branch?