aspx ページの OutputCache を 1 か所から構成するには、 web.configで定義されたカスタム キャッシュ プロファイルに関連付けられた<%@ OutputCache %>のCacheProfile属性である優れたツールがあります。
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="myProfile" duration="300" />
</outputCacheProfiles>
</outputCacheSettings>
</caching>
そして行:
<%@ OutputCache CacheProfile="myProfile" VaryByParam="None" %>
仕事をします。しかし、ascx ユーザー コントロールに対して同じことを行うにはどうすればよいでしょうか。 CacheProfile が <%@ OutputCache %> にありません:S 回避策はありますか? ありがとう。