Sometimes, there are "many" data to be cached in memory. "Many" are relative, depending on how much memory is consumed, how many items are cached, and how often the data is retrieved. In any case, if you need to cache a large amount of data in memory, consider caching on the Web server's hard disk in text or XML file format. Of course, you can also mix hard disk cache data and memory cache data to achieve optimal caching.
Note: When testing the performance of a single ASP page, retrieving data from the disk is not necessarily faster than retrieving the data from the network database, but caching reduces the call to the network database. This will significantly increase the throughput of the network when called on a large scale. Caching a time-consuming query result is useful, for example, for a complex stored procedure, or for a large number of result data. ASP and COM provide several tools for creating disk-buffered configurations. The Save () and Open () functions of the ADO Recordset are responsible for saving and adjusting the recordset on disk. In addition, there are some components:
Scripting.FileSystemObject allows you to create, read, and write files
Msxml,microsoft XML Parser with Internet Explorer, support for saving and loading XML documents
LookupTable objects, such as those used on MSN, are a good choice to dial into a simple list from disk.
Finally, consider the expression that caches the disk data, not the data itself. preprocessed HTML can be stored as. htm or. asp files, and links point directly to them. You can automate these processes with business tools such as Xbuilder or Microsoft SQL Server Internet Publishing classes. Also, you can include an HTML program fragment in an. asp file. Similarly, you can use FileSystemObject to read HTML files from disk or use XML for early rendering to do this work.