AggregateCacheDependency.Add メソッド
アセンブリ: System.Web (system.web.dll 内)

Dim instance As AggregateCacheDependency Dim dependencies As CacheDependency() instance.Add(dependencies)

Add メソッドと AggregateCacheDependency コンストラクタを組み合わせて使用して 2 つの CacheDependency オブジェクトを作成し、それらを CacheDependency 配列 (myDepArray) に追加してから、キャッシュ内の項目をこの 2 つの CacheDependency オブジェクトに依存させるコード例を次に示します。
' Create two CacheDependency objects, one to a ' text file and the other to an XML file. ' Create a CacheDependency array with these ' two objects as items in the array. txtDep = New CacheDependency(Server.MapPath("Storage.txt")) xmlDep = New CacheDependency(Server.MapPath("authors.xml")) Dim DepArray() As CacheDependency = {txtDep, xmlDep} ' Create an AggregateCacheDependency object and ' use the Add method to add the array to it. aggDep = New AggregateCacheDependency() aggDep.Add(DepArray) ' Call the GetUniqueId method to generate ' an ID for each dependency in the array. msg1.Text = aggDep.GetUniqueId() ' Add the new data set to the cache with ' dependencies on both files in the array. Cache.Insert("XMLDataSet", Source, aggDep)

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- AggregateCacheDependency.Add メソッドのページへのリンク