public static string Tag( string rootRelativePath )
{
if ( HttpRuntime.Cache[rootRelativePath] == null )
{
string absolute = HostingEnvironment.MapPath( rootRelativePath );
if ( File.Exists( absolute ) )
{
DateTime date = File.GetLastWriteTime( absolute );
string result = rootRelativePath + "?v=" + date.Ticks;
HttpRuntime.Cache.Insert( rootRelativePath, result, new CacheDependency( absolute ) );
}
}
return HttpRuntime.Cache[rootRelativePath] as string;
}