PartialCachingAttributeとは? わかりやすく解説

PartialCachingAttribute クラス

Web フォーム ユーザー コントロール (.ascx files) が、出力をキャッシュするかどうか、およびその方法を示すために使用するメタデータ属性を定義します。このクラスは継承できません。

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

<AttributeUsageAttribute(AttributeTargets.Class)> _
Public NotInheritable Class
 PartialCachingAttribute
    Inherits Attribute
Dim instance As PartialCachingAttribute
[AttributeUsageAttribute(AttributeTargets.Class)] 
public sealed class PartialCachingAttribute
 : Attribute
[AttributeUsageAttribute(AttributeTargets::Class)] 
public ref class PartialCachingAttribute sealed
 : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class) */ 
public final class PartialCachingAttribute
 extends Attribute
AttributeUsageAttribute(AttributeTargets.Class) 
public final class PartialCachingAttribute
 extends Attribute
解説解説

PartialCachingAttribute 属性クラスは、フラグメント キャッシュをサポートするユーザー コントロール (.ascx files) をマークし、ASP.NET がコントロールをキャッシュするときに使用するキャッシュ設定をカプセル化します。ページおよびコントロールの開発者は、PartialCachingAttribute 属性を使用して、分離コード ファイルのユーザー コントロールの出力キャッシュを有効にします。

PartialCachingAttribute の使用は、出力キャッシュを有効にできる複数の方法の 1 つです。出力キャッシュを有効にするために使用できる方法は、次のとおりです。

ユーザー コントロールに @ OutputCache ディレクティブが含まれているか、PartialCachingAttribute が適用されている場合、ASP.NET パーサーは、PartialCachingControl クラスのインスタンスを生成して、ユーザー コントロールをラップします。

ASP.NET のキャッシュの詳細については、「ASP.NET キャッシュ」を参照してください。属性の使用方法については、「属性を使用したメタデータの拡張」を参照してください。

使用例使用例

PartialCachingAttribute を使用するコード例を次に示します。この例は、3 つの部分で構成されます。

この例の最初の部分では、UserControl 基本クラスから継承し、PartialCachingAttribute 属性の適用先となる部分クラスを示しています。この例では、属性によって、ユーザー コントロールが 20 秒間キャッシュされることを指定しています。

' Filename is partialcache.vb
' Create a code-behind user control that is cached
' for 20 seconds using the PartialCachingAttribute class.
' This control uses a DataGrid server control to display
' XML data.
Imports System
Imports System.IO
Imports System.Data
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls

Namespace Samples.AspNet.VB.Controls

    ' Set the PartialCachingAttribute.Duration property to 20 seconds.
    <PartialCaching(20)> _
    Partial Class ctlMine
        Inherits UserControl

        Protected Sub Page_Load(ByVal
 Src As [Object], ByVal E As
 EventArgs)
            Dim ds As New
 DataSet()

            Dim fs As New
 FileStream(Server.MapPath("schemadata.xml"), FileMode.Open,
 FileAccess.Read)
            Dim reader As New
 StreamReader(fs)
            ds.ReadXml(reader)
            fs.Close()

            Dim [Source] As New
 DataView(ds.Tables(0))
            ' Use the LiteralControl constructor to create a new
            ' instance of the class.
            Dim myLiteral As New
 LiteralControl()
            ' Set the LiteralControl.Text property to an HTML
            ' string and the TableName value of a data source.
            myLiteral.Text = "<h6><font face=verdana>Caching
 an XML Table: " & [Source].Table.TableName & "
 </font></h6>"
            MyDataGrid.DataSource = [Source]
            MyDataGrid.DataBind()

            TimeMsg.Text = DateTime.Now.ToString("G")
        End Sub 'Page_Load 
    End Class 'ctlMine
End Namespace
// [filename partialcache.cs]
// Create a code-behind user control that is cached
// for 20 seconds using the PartialCachingAttribute class.
// This control uses a DataGrid server control to display
// XML data.
using System;
using System.IO;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Samples.AspNet.CS.Controls
{

    // Set the PartialCachingAttribute.Duration property to 20 seconds.
    [PartialCaching(20)]
    public partial class ctlMine : UserControl
    {

        protected void Page_Load(Object Src,
 EventArgs E)
        {
            DataSet ds = new DataSet();

            FileStream fs = new FileStream(Server.MapPath("schemadata.xml"),
 FileMode.Open, FileAccess.Read);
            StreamReader reader = new StreamReader(fs);
            ds.ReadXml(reader);
            fs.Close();

            DataView Source = new DataView(ds.Tables[0]);
            // Use the LiteralControl constructor to create a new
            // instance of the class.
            LiteralControl myLiteral = new LiteralControl();
            // Set the LiteralControl.Text property to an HTML
            // string and the TableName value of a data source.
            myLiteral.Text = "<h6><font face=verdana>Caching an
 XML Table: " + Source.Table.TableName + " </font></h6>";
            MyDataGrid.DataSource = Source;
            MyDataGrid.DataBind();

            TimeMsg.Text = DateTime.Now.ToString("G");

        }
    }
}
// [filename partialcache.jsl]
// Create a code-behind user control that is cached
// for 20 seconds using the PartialCachingAttribute class.
// This control uses a DataGrid server control to display
// XML data.
import System.*;  
import System.IO.*;  
import System.Data.*;  
import System.Web.*;  
import System.Web.UI.*;  
import System.Web.UI.WebControls.*;  

// Set the PartialCachingAttribute.Duration property to 20 seconds.
/** @attribute PartialCaching(20)
 */
public class ctlMine extends UserControl 
{    
    public DataGrid myDataGrid;
    public Label timeMsg;

    protected void Page_Load(Object src, EventArgs
 e)
    {
        DataSet ds = new DataSet();
        FileStream fs = new FileStream(get_Server().MapPath("schemadata.xml")
,
            FileMode.Open, FileAccess.Read);
        StreamReader reader = new StreamReader(fs);
        ds.ReadXml(reader);
        fs.Close();
        DataView source = new DataView(ds.get_Tables().get_Item(0));
        // Use the LiteralControl constructor to create a new
        // instance of the class.
        LiteralControl myLiteral = new LiteralControl();
        // Set the LiteralControl.Text property to an HTML
        // string and the TableName value of a data source.
        myLiteral.set_Text("<h6><font face=verdana>Caching an XML
 Table: " 
            + source.get_Table().get_TableName() + " </font></h6>");
        myDataGrid.set_DataSource(source);
        myDataGrid.DataBind();
        timeMsg.set_Text(DateTime.get_Now().ToString("G"));
    } //Page_Load 
} //ctlMine

この例の 2 番目の部分には、前述の例でユーザー コントロールのキャッシュ方法を示すために使用するユーザー コントロールを示しています。

<!-- The mark-up .ascx file that displays the output of
     the partialcache.vb user control code-behind file. -->
<%@ Control language="vb" inherits="Samples.AspNet.VB.Controls.ctlMine"
 CodeFile="partialcache.vb.ascx.vb" %>

  <ASP:DataGrid id="MyDataGrid" runat="server"
    Width="900"
    BackColor="#ccccff"
    BorderColor="black"
    ShowFooter="false"
    CellPadding=3
    CellSpacing="0"
    Font-Name="Verdana"
    Font-Size="8pt"
    HeaderStyle-BackColor="#aaaadd"
    EnableViewState="false"
  />

  <p>

  <i>Control last generated on:</i> <asp:label
 id="TimeMsg" runat="server"
 />
<!-- The mark-up .ascx file that displays the output of
     the partialcache.cs user control code-behind file. -->
<%@ Control language=C# inherits="Samples.AspNet.CS.Controls.ctlMine"
 CodeFile="partialcache.cs.ascx.cs" %>

  <ASP:DataGrid id="MyDataGrid" runat="server"
    Width="900"
    BackColor="#ccccff"
    BorderColor="black"
    ShowFooter="false"
    CellPadding=3
    CellSpacing="0"
    Font-Name="Verdana"
    Font-Size="8pt"
    HeaderStyle-BackColor="#aaaadd"
    EnableViewState="false"
  />

  <p>

  <i>Control last generated on:</i> <asp:label id="TimeMsg"
 runat="server" />
// The mark-up .ascx file that displays the output of
// the partialcache.jsl user control code-behind file.
<%@ Control language=VJ# inherits="ctlMine" src="partialcache.jsl"
 %>

  <ASP:DataGrid id="myDataGrid" runat="server"
    Width="900"
    BackColor="#ccccff"
    BorderColor="black"
    ShowFooter="false"
    CellPadding=3
    CellSpacing="0"
    Font-Name="Verdana"
    Font-Size="8pt"
    HeaderStyle-BackColor="#aaaadd"
    EnableViewState="false"
  />

  <p>

  <i>Control last generated on:</i> <asp:label id="timeMsg"
 runat="server" />

この例の 3 番目の部分では、ユーザー コントロールをホストする Web フォーム ページを示しています。

<!-- The WebForms page that contains the user control generated
     by partialcache.vb. -->
<%@ Register TagPrefix="Acme" TagName="Cache"
 Src="partialcache.vb.ascx" %>

<html>
<script language="vb" runat="server">

   Sub Page_Load(Src As [Object], E As
 EventArgs) 
      TimeMsg.Text = DateTime.Now.ToString("G")
   End Sub 'Page_Load

  </script>

<body>
  
  <form runat=server>
    <Acme:Cache runat=server/>
    <br>

    <i>Page last generated on:</i> <asp:label id="TimeMsg"
 runat="server" />

  </form>
</body>
</html>
<!-- The WebForms page that contains the user control generated
     by partialcache.cs. -->
<%@ Register TagPrefix="Acme" TagName="Cache" Src="partialcache.cs.ascx"
 %>

<html>
<script language="C#" runat="server">

      void Page_Load(Object Src, EventArgs E ) {

          TimeMsg.Text = DateTime.Now.ToString("G");
      }

  </script>

<body>
  
  <form runat=server>
    <Acme:Cache runat=server/>
    <br>

    <i>Page last generated on:</i> <asp:label id="TimeMsg"
 runat="server" />

  </form>
</body>
</html>
// The WebForms page that contains the user control generated
// by partialcache.jsl.
<%@ Register TagPrefix="Acme" TagName="Cache" Src="partialcache.jsl.ascx"
 %>

<html>
<script language="VJ#" runat="server">

void Page_Load(Object src, EventArgs e ) 
{
    TimeMsg.set_Text(DateTime.get_Now().ToString("G"));
} //Page_Load

  </script>

<body>
  
  <form runat=server>
    <Acme:Cache runat=server/>
    <br>

    <i>Page last generated on:</i> <asp:label id="TimeMsg"
 runat="server" />

  </form>
</body>
</html>
.NET Framework のセキュリティ.NET Framework のセキュリティ
継承階層継承階層
System.Object
   System.Attribute
    System.Web.UI.PartialCachingAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

PartialCachingAttribute コンストラクタ (Int32)

キャッシュされるユーザー コントロールに割り当てる存続期間を指定して、PartialCachingAttribute クラスの新しいインスタンスを初期化します。

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

Dim duration As Integer

Dim instance As New PartialCachingAttribute(duration)
public PartialCachingAttribute (
    int duration
)
public:
PartialCachingAttribute (
    int duration
)
public PartialCachingAttribute (
    int duration
)
public function PartialCachingAttribute (
    duration : int
)

パラメータ

duration

ユーザー コントロールを出力キャッシュに残しておく時間 (秒数)。

使用例使用例

PartialCachingAttribute(Int32) コンストラクタをユーザー コントロールに適用する方法を次のコード例に示します。この例では、このコンストラクタを使用して、ユーザー コントロールをキャッシュできることを示し、キャッシュの存続期間を指定しています。このコード例は、PartialCachingAttribute クラスのトピックで取り上げているコード例の一部分です。

' Set the PartialCachingAttribute.Duration property to 20 seconds.
<PartialCaching(20)> _
Partial Class ctlMine
    Inherits UserControl
// Set the PartialCachingAttribute.Duration property to 20 seconds.
[PartialCaching(20)]
public partial class ctlMine : UserControl
// Set the PartialCachingAttribute.Duration property to 20 seconds.
/** @attribute PartialCaching(20)
 */
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PartialCachingAttribute クラス
PartialCachingAttribute メンバ
System.Web.UI 名前空間

PartialCachingAttribute コンストラクタ (Int32, String, String, String, Boolean)

キャッシュの存続期間、GET および POST の値、コントロール名、キャッシュを変更するために使用するカスタム出力キャッシュ要件、およびユーザー コントロール出力を複数のページで共有できるようにするかどうかを指定して、PartialCachingAttribute クラスの新しいインスタンスを初期化します。

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    duration As Integer, _
    varyByParams As String, _
    varyByControls As String, _
    varyByCustom As String, _
    shared As Boolean _
)
Dim duration As Integer
Dim varyByParams As String
Dim varyByControls As String
Dim varyByCustom As String
Dim shared As Boolean

Dim instance As New PartialCachingAttribute(duration,
 varyByParams, varyByControls, varyByCustom, shared)
public PartialCachingAttribute (
    int duration,
    string varyByParams,
    string varyByControls,
    string varyByCustom,
    bool shared
)
public:
PartialCachingAttribute (
    int duration, 
    String^ varyByParams, 
    String^ varyByControls, 
    String^ varyByCustom, 
    bool shared
)
public PartialCachingAttribute (
    int duration, 
    String varyByParams, 
    String varyByControls, 
    String varyByCustom, 
    boolean shared
)
public function PartialCachingAttribute (
    duration : int, 
    varyByParams : String, 
    varyByControls : String, 
    varyByCustom : String, 
    shared : boolean
)

パラメータ

duration

ユーザー コントロールがキャッシュされる時間 (秒数)。

varyByParams

出力キャッシュの変更に使用される文字列のセミコロン区切りのリスト。既定では、これらの文字列は、GET メソッド属性を設定して送信されたクエリ文字列値、または POST メソッドを使用して送られたパラメータに対応しています。この属性を複数のパラメータに設定すると、出力キャッシュにはそれぞれの指定したパラメータに対して要求されたドキュメントの異なったバージョンが含まれます。指定できる値は、"none"、"*"、有効なクエリ文字列、または POST パラメータ名です。

varyByControls

出力キャッシュの変更に使用される文字列のセミコロン区切りのリスト。これらの文字列は、ユーザー コントロールのプロパティの完全修飾名を表します。ユーザー コントロールでこのパラメータを使用すると、指定された各ユーザー コントロール プロパティのキャッシュに合わせてユーザー コントロール出力が変化します。

varyByCustom

カスタム出力キャッシュ要件を表すテキスト。このパラメータに "browser" の値が指定された場合は、キャッシュがブラウザ名およびメジャー バージョン情報に応じて変化します。カスタム文字列を入力する場合は、アプリケーションの Global.asax ファイルの HttpApplication.GetVaryByCustomString メソッドをオーバーライドする必要があります。

shared

複数のページでユーザー コントロールの出力を共有できることを示す場合は true。それ以外の場合は false。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PartialCachingAttribute クラス
PartialCachingAttribute メンバ
System.Web.UI 名前空間

PartialCachingAttribute コンストラクタ

PartialCachingAttribute クラスの新しいインスタンスを初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
PartialCachingAttribute (Int32) キャッシュされるユーザー コントロールに割り当てる存続期間を指定して、PartialCachingAttribute クラスの新しいインスタンスを初期化します。
PartialCachingAttribute (Int32, String, String, String) キャッシュの存続期間、GET および POST の値、コントロール名、およびキャッシュを変更するために使用するカスタム出力キャッシュ要件を指定して、PartialCachingAttribute クラスの新しいインスタンスを初期化します。
PartialCachingAttribute (Int32, String, String, String, Boolean) キャッシュの存続期間、GET および POST の値、コントロール名、キャッシュを変更するために使用するカスタム出力キャッシュ要件、およびユーザー コントロール出力を複数のページで共有できるようにするかどうかを指定して、PartialCachingAttribute クラスの新しいインスタンスを初期化します。
PartialCachingAttribute (Int32, String, String, String, String, Boolean) キャッシュの存続期間、GET および POST の値、コントロール名、キャッシュを変更するために使用するカスタム出力キャッシュ要件、データベースの依存関係、およびユーザー コントロール出力を複数のページで共有できるようにするかどうかを指定して、PartialCachingAttribute クラスの新しいインスタンスを初期化します。
参照参照

関連項目

PartialCachingAttribute クラス
PartialCachingAttribute メンバ
System.Web.UI 名前空間

PartialCachingAttribute コンストラクタ (Int32, String, String, String)

キャッシュの存続期間、GET および POST の値、コントロール名、およびキャッシュを変更するために使用するカスタム出力キャッシュ要件を指定して、PartialCachingAttribute クラスの新しいインスタンスを初期化します。

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    duration As Integer, _
    varyByParams As String, _
    varyByControls As String, _
    varyByCustom As String _
)
Dim duration As Integer
Dim varyByParams As String
Dim varyByControls As String
Dim varyByCustom As String

Dim instance As New PartialCachingAttribute(duration,
 varyByParams, varyByControls, varyByCustom)
public PartialCachingAttribute (
    int duration,
    string varyByParams,
    string varyByControls,
    string varyByCustom
)
public:
PartialCachingAttribute (
    int duration, 
    String^ varyByParams, 
    String^ varyByControls, 
    String^ varyByCustom
)
public PartialCachingAttribute (
    int duration, 
    String varyByParams, 
    String varyByControls, 
    String varyByCustom
)
public function PartialCachingAttribute (
    duration : int, 
    varyByParams : String, 
    varyByControls : String, 
    varyByCustom : String
)

パラメータ

duration

ユーザー コントロールがキャッシュされる時間 (秒数)。

varyByParams

出力キャッシュの変更に使用される文字列のセミコロン区切りのリスト。既定では、これらの文字列は、GET メソッド属性を設定して送信されたクエリ文字列値、または POST メソッドを使用して送信されたパラメータに対応しています。この属性を複数のパラメータに設定すると、出力キャッシュにはそれぞれの指定したパラメータに対して要求されたドキュメントの異なったバージョンが含まれます。指定できる値は、"none"、"*"、有効なクエリ文字列、または POST パラメータ名です。

varyByControls

出力キャッシュの変更に使用される文字列のセミコロン区切りのリスト。これらの文字列は、ユーザー コントロールのプロパティの完全修飾名を表します。ユーザー コントロールでこのパラメータを使用すると、指定された各ユーザー コントロール プロパティのキャッシュに合わせてユーザー コントロール出力が変化します。

varyByCustom

カスタム出力キャッシュ要件を表すテキスト。このパラメータに "browser" の値が指定された場合は、キャッシュがブラウザ名およびメジャー バージョン情報に応じて変化します。カスタム文字列を入力する場合は、アプリケーションの Global.asax ファイルの HttpApplication.GetVaryByCustomString メソッドをオーバーライドする必要があります。

使用例使用例

PartialCachingAttribute(Int32,String,String,String) コンストラクタをユーザー コントロールに適用する方法を次のコード例に示します。この例では、このコンストラクタを使用して、ユーザー コントロールをキャッシュできることを示し、キャッシュの存続期間を 20 秒に指定して、ユーザー コントロールの出力の変化の対象となる state という名前のコントロールを指定しています。

' Set the PartialCachingAttribute.Duration property to
' 20 seconds and the PartialCachingAttribute.VaryByControls
' property to the ID of the server control to vary the output by.
' In this case, it is state, the ID assigned to a DropDownList
' server control.
<PartialCaching(20, Nothing, "state",
 Nothing)> _
Public Class ctlSelect
    Inherits UserControl
// Set the PartialCachingAttribute.Duration property to
// 20 seconds and the PartialCachingAttribute.VaryByControls
// property to the ID of the server control to vary the output by.
// In this case, it is state, the ID assigned to a DropDownList
// server control.
[PartialCaching(20, null, "state", null)]
// Set the PartialCachingAttribute.Duration property to
// 20 seconds and the PartialCachingAttribute.VaryByControls
// property to the ID of the server control to vary the output by.
// In this case, it is state, the ID assigned to a DropDownList
// server control.
/** @attribute PartialCaching(20, null, "state", null)
 */
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PartialCachingAttribute クラス
PartialCachingAttribute メンバ
System.Web.UI 名前空間

PartialCachingAttribute コンストラクタ (Int32, String, String, String, String, Boolean)

メモ : このコンストラクタは、.NET Framework version 2.0 で新しく追加されたものです。

キャッシュの存続期間、GET および POST の値、コントロール名、キャッシュを変更するために使用するカスタム出力キャッシュ要件、データベースの依存関係、およびユーザー コントロール出力を複数のページで共有できるようにするかどうかを指定して、PartialCachingAttribute クラスの新しいインスタンスを初期化します。

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    duration As Integer, _
    varyByParams As String, _
    varyByControls As String, _
    varyByCustom As String, _
    sqlDependency As String, _
    shared As Boolean _
)
Dim duration As Integer
Dim varyByParams As String
Dim varyByControls As String
Dim varyByCustom As String
Dim sqlDependency As String
Dim shared As Boolean

Dim instance As New PartialCachingAttribute(duration,
 varyByParams, varyByControls, varyByCustom, sqlDependency, shared)
public PartialCachingAttribute (
    int duration,
    string varyByParams,
    string varyByControls,
    string varyByCustom,
    string sqlDependency,
    bool shared
)
public:
PartialCachingAttribute (
    int duration, 
    String^ varyByParams, 
    String^ varyByControls, 
    String^ varyByCustom, 
    String^ sqlDependency, 
    bool shared
)
public PartialCachingAttribute (
    int duration, 
    String varyByParams, 
    String varyByControls, 
    String varyByCustom, 
    String sqlDependency, 
    boolean shared
)
public function PartialCachingAttribute (
    duration : int, 
    varyByParams : String, 
    varyByControls : String, 
    varyByCustom : String, 
    sqlDependency : String, 
    shared : boolean
)

パラメータ

duration

ユーザー コントロールがキャッシュされる時間 (秒数)。

varyByParams

出力キャッシュの変更に使用される文字列のセミコロン区切りのリスト。既定では、これらの文字列は、GET メソッド属性を設定して送信されたクエリ文字列値、または POST メソッドを使用して送られたパラメータに対応しています。この属性を複数のパラメータに設定すると、出力キャッシュにはそれぞれの指定したパラメータに対して要求されたドキュメントの異なったバージョンが含まれます。指定できる値は、"none"、"*"、有効なクエリ文字列、または POST パラメータ名です。

varyByControls

出力キャッシュの変更に使用される文字列のセミコロン区切りのリスト。これらの文字列は、ユーザー コントロールのプロパティの完全修飾名を表します。ユーザー コントロールでこのパラメータを使用すると、指定された各ユーザー コントロール プロパティのキャッシュに合わせてユーザー コントロール出力が変化します。

varyByCustom

カスタム出力キャッシュ要件を表すテキスト。このパラメータに "browser" の値が指定された場合は、キャッシュがブラウザ名およびメジャー バージョン情報に応じて変化します。カスタム文字列を入力する場合は、アプリケーションの Global.asax ファイルの HttpApplication.GetVaryByCustomString メソッドをオーバーライドする必要があります。

sqlDependency

変更されたときに ASP.NET キャッシュ内のキャッシュ エントリを明示的に期限切れにするデータベース名とテーブル名の、区切り記号で区切られたリスト。これらのデータベース名は、Web 構成セクションで指定されている SQL Server キャッシュの依存関係と一致します。

shared

複数のページでユーザー コントロールの出力を共有できることを示す場合は true。それ以外の場合は false。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PartialCachingAttribute クラス
PartialCachingAttribute メンバ
System.Web.UI 名前空間

PartialCachingAttribute プロパティ


PartialCachingAttribute メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 ( Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスのハッシュ コードを返します。 ( Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 ( Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 ( Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 ( Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 ( Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

PartialCachingAttribute クラス
System.Web.UI 名前空間
UserControl

その他の技術情報

ASP.NET ユーザー コントロール
ASP.NET ページの一部だけのキャッシュ
@ OutputCache

PartialCachingAttribute メンバ

Web フォーム ユーザー コントロール (.ascx files) が、出力をキャッシュするかどうか、およびその方法を示すために使用するメタデータ属性を定義します。このクラスは継承できません。

PartialCachingAttribute データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド PartialCachingAttribute オーバーロードされます。 PartialCachingAttribute クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 (Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 (Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスのハッシュ コードを返します。 (Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 (Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 (Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 (Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 (Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

PartialCachingAttribute クラス
System.Web.UI 名前空間
UserControl

その他の技術情報

ASP.NET ユーザー コントロール
ASP.NET ページの一部だけのキャッシュ
@ OutputCache



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「PartialCachingAttribute」の関連用語

PartialCachingAttributeのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



PartialCachingAttributeのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS