Intersoft WebCombo Documentation
DataCacheStorage Property
See Also  Send Feedback
ISNet.WebUI.WebCombo Namespace > WebCombo Class : DataCacheStorage Property






Specifies where to store the data cache. Specifies where to store the data cache.

Syntax

Visual Basic (Declaration) 
<ISNet.Serialization.BinarySerializableAttribute()>
<CategoryAttribute("Data")>
<DefaultValueAttribute()>
<DescriptionAttribute("Specifies where to store the data cache.")>
Public Property DataCacheStorage As ISNet.WebUI.CacheStorage
Visual Basic (Usage)Copy Code
Dim instance As WebCombo
Dim value As ISNet.WebUI.CacheStorage
 
instance.DataCacheStorage = value
 
value = instance.DataCacheStorage
C# 
[ISNet.Serialization.BinarySerializableAttribute()]
[CategoryAttribute("Data")]
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies where to store the data cache.")]
public ISNet.WebUI.CacheStorage DataCacheStorage {get; set;}
Delphi 
public read-write property DataCacheStorage: ISNet.WebUI.CacheStorage; 
JScript 
ISNet.Serialization.BinarySerializableAttribute()
CategoryAttribute("Data")
DefaultValueAttribute()
DescriptionAttribute("Specifies where to store the data cache.")
public function get,set DataCacheStorage : ISNet.WebUI.CacheStorage
Managed Extensions for C++ 
[ISNet.Serialization.BinarySerializableAttribute()]
[CategoryAttribute("Data")]
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies where to store the data cache.")]
public: __property ISNet.WebUI.CacheStorage get_DataCacheStorage();
public: __property void set_DataCacheStorage( 
   ISNet.WebUI.CacheStorage value
);
C++/CLI 
[ISNet.Serialization.BinarySerializableAttribute()]
[CategoryAttribute("Data")]
[DefaultValueAttribute()]
[DescriptionAttribute("Specifies where to store the data cache.")]
public:
property ISNet.WebUI.CacheStorage DataCacheStorage {
   ISNet.WebUI.CacheStorage get();
   void set (    ISNet.WebUI.CacheStorage value);
}

Remarks

In previous version of WebCombo.NET, there were only 2 option on where to store datacache. They are PageCache and Session. 

The data caching feature in version 4.0 has been significantly improved to avoid memory leaks and lower usage of allocated resources when DataCacheStorage is set to PageCache.

WebCombo.NET v4.0 allows you to store data cache to a physical disc in the local computer or a shared drive in network. If you choose "FileServer" on DataCacheStorage, the data cache will be stored to the path defined in CacheServerConnection property. This new option allows better scalability and reliability to your web application, as the data caches are no longer stored in ASP.NET's worker process or Session.

Some of benefits using FileServer cache are:

  • Highly scalable. You can choose a network drive to store the caches which enable multiple web servers to access the state.
  • Decent performance. With more than dozen of high performance hard drives, you can choose a near-memory speed with high random access and sequential read write hard drive to store the caches.
  • Easily extensible. Unlike memory (RAM), you can easily extend hard drives with larger one when it becomes insufficient.

 

Features of FileServer:

  • Automatic cleaning. When the cache for the viewstate has expired, the caches will be automatically deleted.
  • Easily configurable for application-wide through web.config.
  • Allow customizations on cache policy and expiration duration.
The default value is PageCache. The PageCache data storage implementation is the one implemented in previous version of WebCombo component. This property is only taken affect when AllowAutoDataCaching property is set to True (by default).

The new Session data storage mode enables better datasource persistent mechanism when information is more scoped per user's session. With this mode, datasource's cache will be valid as long as the session hasn't expired.

The default PageCache storage mode is sufficient and effective for most development scenarios. Following describes the behavior of both modes:

PageCache

  • Stored in ASP.NET's built-in Cache object.
  • Expiring in a time period, default is 15 minutes.
  • Use SetCacheControl() method to control cache's time and priority.
  • Requires implementation of InitializeDataSource event to taken affect effectively.
  • Best used for scenarios when all level of data can be retrieved once together.

Session

  • Stored in Session object.
  • Expiring when session is timed out or Session.Abandon() method is called. To longer the cache time, simply increase the Session's timeout value.
  • Doesn't require implementation of InitializeDataSource event. Work perfectly with common databinding method using DataBind() in Page_Load event. However, databinding implementation using InitializeDataSource event is more recommended for centralized and standarization in control's binding mechanism.
  • Best used for scenarios when data is scoped based per user/session and when on demand data retrieval implementation is required for WebCombo.
  • Better performance, the control will only hit the database for first page load and use the cached data for entire session - unlike PageCache which will need to renew the data in a time period.
  • Better scalability, you can implement SqlServer mode for storing the Session's data for larger applications that work in WebFarm or clustering.

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

Reference

WebCombo Class
WebCombo Members

Concepts

Automatic Data Caching Handler
Improved Data Caching
Cache

Tasks

How-to: Disable auto data caching

Other Resources

Improved Data Caching

© 2012 Intersoft Solutions Corp. All Rights Reserved.