File-based dependency
It is Based on the file saved in a disk .Using cache dependency, we can force ASP.NET to expire cached data items from the cache when the dependency filechanges. We can set the dependency to multiple files also. On such cases, the dependency should be built from an array of files or directories.
key-based dependency
Key-based dependency invalidates a particular cache item when another cache item changes. This is useful when we have multiple interrelated objects in the cache and if one of the objects changes, we need to updated or expire all of them.