We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Fragment Caching

Hi....

Im working on Fragment Caching, since "Location" attribute is not defined for the user controls. Im looking for help to make the Caching specific either to Client or Server Side. And also i wanted to delete the cache according to the CacheKey ... Pls advice me on the same.


1 Reply

PN Pradeep N Syncfusion Team May 1, 2009 11:21 AM UTC

Hi,

The fregement caching is done as follows,

<%@ OutputCache Duration="60" Location="Client" %>

To cache a user control we can use VaryBy Control attribute of output cache to cache the specific user control.

page would cached for 60 seconds specifically for the UserControl1.

If Location="Server" is specified Page will be cached on the server only.

If Location="Server" is specified Page will be cached on the client browser only.

The expiry of cache is done by setting a time span while inserting through Cache.Insert() or make it expired after a certain logic using Cache.Remove().

Regrds,
Pradeep.




Loader.
Live Chat Icon For mobile
Up arrow icon