Answering my own question for the sake of future generations....
We ended up overriding the GetCacheDependency call to ensure that the view is never cached. (We cache views manually). We had to create a FakeCacheDependency that lets us use the last modified date from our cache.
In our application, our virtual views are called CondorVirtualFiles. (When building a views engine, you need to give it a cool name.)
public override System.Web.Caching.CacheDependency GetCacheDependency(string virtualPath, System.Collections.IEnumerable virtualPathDependencies, DateTime utcStart)
{
var view = this.GetFile(virtualPath);
if (view is CondorVirtualFile)
{
FakeCacheDependency fcd = new FakeCacheDependency((view as CondorVirtualFile).LastModified);
return fcd;
}
return base.GetCacheDependency(virtualPath, virtualPathDependencies, utcStart);
}
public class FakeCacheDependency : System.Web.Caching.CacheDependency
{
public FakeCacheDependency(DateTime lastModified)
{
base.SetUtcLastModified(lastModified);
}
public FakeCacheDependency()
{
base.SetUtcLastModified(DateTime.UtcNow);
}
}