AddCacheDependency or AddFileDependency?
<p>What’s the difference between Response.AddCacheDependency and Response.AddFileDependency in terms of implementing a file dependency for a cache? The following code seems to work in both cases but which approach should I be using?</p>

<pre><code>Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim authorsDependency As New CacheDependency(Server.MapPath("authors.xml"))
        Response.AddCacheDependency(authorsDependency)
        Response.Cache.SetCacheability(HttpCacheability.Public)
        Response.Cache.SetValidUntilExpires(True)

        Response.Write(DateTime.Now.ToString())

    End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Response.AddFileDependency(Server.MapPath("authors.xml"))
        Response.Cache.SetCacheability(HttpCacheability.Public)
        Response.Cache.SetValidUntilExpires(True)

        Response.Write(DateTime.Now.ToString())

    End Sub
</code></pre>
