Hi All, Sorry for the delay got busy at work ![]() Please refer the attached Document for Details. Overview : The ASP.NET Application Data Cache allows cached data to be expired based on various parameters, including dependencies on external files. However, most business applications frequently tend to follow the same pattern, where data extracted from a SQL Server database is stored in some data structure and cached in the ASP.NET cache. The underlying data in the database may change due to any external event such as some one executing a SQL update against the database. It would be useful to have a mechanism to expire the cached data structure in response to such external changes, and have a callback mechanism to facilitate reloading and refreshing caching of the invalidated data, much in the same fashion as the dependency on external files work. Unfortunately ASP.NET does not provide such a mechanism. This code sample offers a glimpse on what is possible. Cache invalidation Using WMI � The user makes a request for cached data to the Caching Manager. If the data exists in the cache memory, it is returned to the client; if the data is not cached, its retrieved from the Data source (File or Database table). Cache Manager then starts a watcher on the database object to check for any data change in the data source and invalidates the cache as and when the data changes this is achieved using WMI. � The user can keep the objects in the cache on specifying the key for that object. So that it can be used whenever needed. User can also set the dependencies to invalidate that object from the cache. This can be done on specifying the files and time span. WMI Now that we will be using WMI in this process of achiving cacheing dependency with SQl Server 2000 lets beging with a breef into on what WMI is all about. WMI provides extensive instrumentation to accomplish almost any management task for many high-end applications (for example, Microsoft Exchange, Microsoft SQL Server, and Microsoft Internet Information Services (IIS)). An administrator can perform the following tasks: � Monitor the health of the applications. � Detect bottlenecks or failures. � Manage and configure applications. � Query application data (use the traversal and querying of object relationships). � Perform seamless local or remote management operations. The WMI architecture consists of the following three tiers: � Clients Software components that perform operations using WMI (for example, reading management details, configuring systems, and subscribing to events). � Object manager A broker between providers and clients that provides some key services, such as standard event publication and subscription, event filtering, query engine, and so on. � Providers Software components that capture and return live data to the client applications, process method invocations from the clients, and link the client to the infrastructure being managed. The provision of data and events and the ability to configure systems are provided seamlessly to clients and applications through a well-defined schema. In the .NET Framework, the System.Management namespace provides common classes to traverse the WMI schema. Prerequisites In addition to the .NET Framework, Windows Management Instrumentation should be installed on web server Thanks And Regards Dharmesh |