In file-based dependency, you have to depend on a file that is saved in a disk. In key-based dependency, you have to depend on another cached item.