How to improve performance in ASP.NET by page cache
Hi all,
The best and fastest way to improve performance through caching to improve, of course, for any web developer should use the cache.Asp.netCaching mechanism under the very strong, with good caching mechanism allows us to greatly improve the performance of web applications, I want to know page cache in ASP.NET. Share some knowledge and experience. Thanks in advance.
How to improve performance in ASP.NET by page cache
Cache Profile in ASP.NET is used to define cache settings associated with the page name. It is an optional attribute, the default value is null character ("")。 Important to note that, included in the user control of the @ OutputCache directive does not support this property. Specify this attribute in the page, the attribute value must be configured with the Web.config file <outputCacheSettings> under section outputCacheProfiles element match the name of one of the available items. If this name does not match the configuration file entry, an exception is thrown. Check ans reply.
Re: How to improve performance in ASP.NET by page cache
You can also use NoStore method. This property defines a Boolean value used to decide whether to block the secondary storage of sensitive information. Important to note that, included in the user control of the @ OutputCache directive does not support this property. This property is set to true is equivalent to execute code during the request "Response.Cache.SetNoStore ();". Best of luck.
How to improve performance in ASP.NET by page cache
Use the Duration method, The page or user control used to set the cache time by units of seconds. By setting the property to the HTTP response from the object the establishment of a expiration policy, and will automatically cache a page or user control output. Note that, Duration attribute is required, otherwise it will cause parser errors. All the best. :ohyeah:
How to improve performance in ASP.NET by page cache
You can also use Location property. It is used to specify the output location of the cache entry. Its property values are OutputCacheLocation enumeration values, they are Any, Client, Downstream, None, Server, and ServerAndClient. The default value is Any, said output buffer can be used for all requests, including the client browser, proxy server, or processing the request on the server. Important to note that, included in the user control of the @ OutputCache directive does not support this property. Check and reply.
How to improve performance in ASP.NET by page cache
VaryByCustom is used for custom output caching requirements of any text. If the given value of the property browser, the cache with the browser name and major version information vary. If you enter a custom string, you must in the application's Global.asax file rewrite HttpApplication. GetVaryByCustomString method. Cheers. :cool:
Re: How to improve performance in ASP.NET by page cache
I just want to point out here the disadvantages of ASP.NET cache here so that developers may be aware of the potential issues they may face. Issues with ASP.NET cache include:
1- Data Integrity Problems in Web Gardens /Web farms.
2- Cache size limitations
3- Single point of failure
4- Scalability problems
5- etc
An alternative to ASP.NET cache is a third-party distributed cache solution. I have personally used a free edition of NCache, called NCache Express. This application lets you store ASP.NET Sessions in cache without requiring you to change any code.
It is easy to setup and has no limitations that are in ASP.NET cache.