Intersoft WebGrid Documentation
AllowAutoDataCaching Property
See Also  Send Feedback
ISNet.WebUI.WebGrid Namespace > WebGrid Class : AllowAutoDataCaching Property






Specifies whether data caching is automatically handled by the control.

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Specifies whether data caching is automatically handled by the control.")>
<DefaultValueAttribute()>
<CategoryAttribute("Data")>
<ISNet.Serialization.BinarySerializableAttribute()>
Public Property AllowAutoDataCaching As Boolean
Visual Basic (Usage)Copy Code
Dim instance As WebGrid
Dim value As Boolean
 
instance.AllowAutoDataCaching = value
 
value = instance.AllowAutoDataCaching
C# 
[DescriptionAttribute("Specifies whether data caching is automatically handled by the control.")]
[DefaultValueAttribute()]
[CategoryAttribute("Data")]
[ISNet.Serialization.BinarySerializableAttribute()]
public bool AllowAutoDataCaching {get; set;}
Delphi 
public read-write property AllowAutoDataCaching: Boolean; 
JScript 
DescriptionAttribute("Specifies whether data caching is automatically handled by the control.")
DefaultValueAttribute()
CategoryAttribute("Data")
ISNet.Serialization.BinarySerializableAttribute()
public function get,set AllowAutoDataCaching : boolean
Managed Extensions for C++ 
[DescriptionAttribute("Specifies whether data caching is automatically handled by the control.")]
[DefaultValueAttribute()]
[CategoryAttribute("Data")]
[ISNet.Serialization.BinarySerializableAttribute()]
public: __property bool get_AllowAutoDataCaching();
public: __property void set_AllowAutoDataCaching( 
   bool value
);
C++/CLI 
[DescriptionAttribute("Specifies whether data caching is automatically handled by the control.")]
[DefaultValueAttribute()]
[CategoryAttribute("Data")]
[ISNet.Serialization.BinarySerializableAttribute()]
public:
property bool AllowAutoDataCaching {
   bool get();
   void set (    bool value);
}

Example

 

Remarks

This property enables the automatic caching of assigned DataSource object. Always leave this property to True as it's a powerful and effective approach to reduce server's workload and dramatically increase server response time.

By utilizing the power of .NET caching feature, WebGrid.NET implements advanced datacaching mechanism to reduce server workloads. The scope of the cache is session. This enables a greater and more flexible control to the WebGrid object. The WebGrid control keeps track of each session's cache and will automatically remove the DataSource object from cache when it's no longer accessed.

If the DataSource object is a dynamic object -- means that it always been changed or added in less than 5 minutes -- you may consider to set this property to False. However, in most cases, leave this property to True will give your users a faster response.

In order to take advantage of this property, you should always use IsDataCached to check whether the DataSource already been cached before you assign a DataSource. See the example above for details.

In some scenarios, you can assign a different DataSource directly from code with just assigning the DataSource property to new datasource. In this case, old cache will be automatically removed and new instance of cache will be created.

Default value is True.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.