File: ControlCachePolicy.xml

package info (click to toggle)
mono 6.14.1%2Bds2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,282,732 kB
  • sloc: cs: 11,182,461; xml: 2,850,281; ansic: 699,123; cpp: 122,919; perl: 58,604; javascript: 30,841; asm: 21,845; makefile: 19,602; sh: 10,973; python: 4,772; pascal: 925; sql: 859; sed: 16; php: 1
file content (241 lines) | stat: -rw-r--r-- 15,430 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ControlCachePolicy" FullName="System.Web.UI.ControlCachePolicy">
  <TypeSignature Language="C#" Value="public sealed class ControlCachePolicy" />
  <AssemblyInfo>
    <AssemblyName>System.Web</AssemblyName>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <since version=".NET 2.0" />
    <remarks>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>The <see cref="T:System.Web.UI.ControlCachePolicy" /> class is used by developers in programmatic user control scenarios to specify output caching settings for user controls (.ascx files). ASP.NET embeds user controls within a <see cref="T:System.Web.UI.BasePartialCachingControl" /> instance. The <see cref="T:System.Web.UI.BasePartialCachingControl" /> class represents a user control that has output caching enabled. When you access the <see cref="P:System.Web.UI.BasePartialCachingControl.CachePolicy" /> property of a <see cref="T:System.Web.UI.PartialCachingControl" /> control, you will always receive a valid <see cref="T:System.Web.UI.ControlCachePolicy" /> object. However, if you access the <see cref="P:System.Web.UI.UserControl.CachePolicy" /> property of a <see cref="T:System.Web.UI.UserControl" /> control, you receive a valid <see cref="T:System.Web.UI.ControlCachePolicy" /> object only if the user control is already wrapped by a <see cref="T:System.Web.UI.BasePartialCachingControl" /> control. If it is not wrapped, the <see cref="T:System.Web.UI.ControlCachePolicy" /> object returned by the property will throw exceptions when you attempt to manipulate it because it does not have an associated <see cref="T:System.Web.UI.BasePartialCachingControl" />. To determine whether a <see cref="T:System.Web.UI.UserControl" /> instance supports caching without generating exceptions, inspect the <see cref="P:System.Web.UI.ControlCachePolicy.SupportsCaching" /> property.</para>
      <para>Using the <see cref="T:System.Web.UI.ControlCachePolicy" /> class is one of several ways you can enable output caching. The following list describes methods you can use to enable output caching:</para>
      <list type="bullet">
        <item>
          <para>Use the <format type="text/html"><a href="28a9e101-fb44-4198-9cb6-b8a52312fec2">@ OutputCache</a></format> directive to enable output caching in declarative scenarios.</para>
        </item>
        <item>
          <para>Use the <see cref="T:System.Web.UI.PartialCachingAttribute" /> attribute to enable caching for a user control in a code-behind file.</para>
        </item>
        <item>
          <para>Use the <see cref="T:System.Web.UI.ControlCachePolicy" /> class to specify cache settings in programmatic scenarios in which you are working with <see cref="T:System.Web.UI.BasePartialCachingControl" /> instances that have been cache-enabled using one of the previous methods and dynamically loaded using the <see cref="Overload:System.Web.UI.TemplateControl.LoadControl" /> method. A <see cref="T:System.Web.UI.ControlCachePolicy" /> instance can be successfully manipulated only between the Init and PreRender stages of the control life cycle. If you modify a <see cref="T:System.Web.UI.ControlCachePolicy" /> object after the PreRender phase, ASP.NET throws an exception, because any changes made after the control is rendered cannot actually affect cache settings (a control is cached during the Render stage). Finally, a user control instance (and therefore its <see cref="T:System.Web.UI.ControlCachePolicy" /> object) is only available for programmatic manipulation when it is actually rendered. </para>
        </item>
      </list>
    </remarks>
    <summary>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Provides programmatic access to an ASP.NET user control's output cache settings.</para>
    </summary>
  </Docs>
  <Members>
    <Member MemberName="Cached">
      <MemberSignature Language="C#" Value="public bool Cached { set; get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets or sets a value indicating whether fragment caching is enabled for the user control.</para>
        </summary>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="Dependency">
      <MemberSignature Language="C#" Value="public System.Web.Caching.CacheDependency Dependency { set; get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Web.Caching.CacheDependency</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The <see cref="P:System.Web.UI.ControlCachePolicy.Dependency" /> property delegates to the <see cref="P:System.Web.UI.BasePartialCachingControl.Dependency" /> property of the <see cref="T:System.Web.UI.BasePartialCachingControl" /> control that wraps the user control. When the <see cref="T:System.Web.Caching.CacheDependency" /> instance is invalidated, the user control is removed from the cache.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets or sets an instance of the <see cref="T:System.Web.Caching.CacheDependency" /> class associated with the cached user control output.</para>
        </summary>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="Duration">
      <MemberSignature Language="C#" Value="public TimeSpan Duration { set; get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.TimeSpan</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>If an absolute expiration policy is set using the <see cref="M:System.Web.UI.ControlCachePolicy.SetSlidingExpiration(System.Boolean)" /> method, the <see cref="P:System.Web.UI.ControlCachePolicy.Duration" /> property returns the amount of time remaining until cache entry expiration.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets or sets the amount of time that cached items are to remain in the output cache.</para>
        </summary>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="SetExpires">
      <MemberSignature Language="C#" Value="public void SetExpires (DateTime expirationTime);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="expirationTime" Type="System.DateTime" />
      </Parameters>
      <Docs>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Use the <see cref="M:System.Web.UI.ControlCachePolicy.SetExpires(System.DateTime)" /> and <see cref="M:System.Web.UI.ControlCachePolicy.SetSlidingExpiration(System.Boolean)" /> methods (passing true) to instruct the <see cref="T:System.Web.UI.BasePartialCachingControl" /> control that wraps the user control to use a sliding expiration caching policy instead of an absolute expiration policy. Use the <see cref="M:System.Web.UI.ControlCachePolicy.SetExpires(System.DateTime)" /> method and the <see cref="M:System.Web.UI.ControlCachePolicy.SetSlidingExpiration(System.Boolean)" /> method (passing false) to specify an absolute expiration policy.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Instructs the <see cref="T:System.Web.UI.BasePartialCachingControl" /> control that wraps the user control to expire the cache entry at the specified date and time.</para>
        </summary>
        <param name="expirationTime">
          <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.DateTime" /> after which the cached entry expires.</param>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="SetSlidingExpiration">
      <MemberSignature Language="C#" Value="public void SetSlidingExpiration (bool useSlidingExpiration);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="useSlidingExpiration" Type="System.Boolean" />
      </Parameters>
      <Docs>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Use the <see cref="M:System.Web.UI.ControlCachePolicy.SetExpires(System.DateTime)" /> and <see cref="M:System.Web.UI.ControlCachePolicy.SetSlidingExpiration(System.Boolean)" /> methods (passing true) to instruct the <see cref="T:System.Web.UI.BasePartialCachingControl" /> control that wraps the user control to use a sliding expiration caching policy instead of an absolute expiration policy. Use the <see cref="M:System.Web.UI.ControlCachePolicy.SetExpires(System.DateTime)" /> method and the <see cref="M:System.Web.UI.ControlCachePolicy.SetSlidingExpiration(System.Boolean)" /> method (passing false) to specify an absolute expiration policy.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Instructs the <see cref="T:System.Web.UI.BasePartialCachingControl" /> control that wraps the user control to set the user control's cache entry to use sliding or absolute expiration. </para>
        </summary>
        <param name="useSlidingExpiration">
          <attribution license="cc4" from="Microsoft" modified="false" />true to use sliding cache expiration instead of absolute expiration; otherwise, false.</param>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="SetVaryByCustom">
      <MemberSignature Language="C#" Value="public void SetVaryByCustom (string varyByCustom);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="varyByCustom" Type="System.String" />
      </Parameters>
      <Docs>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>If you pass "browser" as the <paramref name="varyByCustom" /> parameter, the user control will be varied by browser type and major version number. If another custom string is entered, you must override the <see cref="M:System.Web.HttpApplication.GetVaryByCustomString(System.Web.HttpContext,System.String)" /> method in your application's Global.asax file. </para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Sets a list of custom strings that the output cache will use to vary the user control.</para>
        </summary>
        <param name="varyByCustom">
          <attribution license="cc4" from="Microsoft" modified="false" />The list of custom strings.</param>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="SupportsCaching">
      <MemberSignature Language="C#" Value="public bool SupportsCaching { get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>A user control supports caching if it is associated with a <see cref="T:System.Web.UI.BasePartialCachingControl" /> instance, which signals that either an <format type="text/html"><a href="28a9e101-fb44-4198-9cb6-b8a52312fec2">@ OutputCache</a></format> directive was parsed by the ASP.NET parser or the user control was decorated with a <see cref="T:System.Web.UI.PartialCachingAttribute" /> attribute.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets a value indicating whether the user control supports caching.</para>
        </summary>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="VaryByControl">
      <MemberSignature Language="C#" Value="public string VaryByControl { set; get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets or sets a list of control identifiers to vary the cached output by.</para>
        </summary>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="VaryByParams">
      <MemberSignature Language="C#" Value="public System.Web.HttpCacheVaryByParams VaryByParams { get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Web.HttpCacheVaryByParams</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <since version=".NET 2.0" />
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>By default, these strings correspond to a query string value sent with the GET method or to a parameter sent using the POST method. When the <see cref="P:System.Web.UI.ControlCachePolicy.VaryByParams" /> property is set to multiple parameters, the output cache contains a different version of the requested document for each specified parameter. Possible values include "none", "*", and any valid query string or POST parameter name.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets or sets a list of GET or POST parameter names to vary the cached output by. </para>
        </summary>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
  </Members>
</Type>