Net.Data itself provides its own caching function for frequently accessed pages and related data items generated by Net.Data macros. By delivering a page from the Net.Data cache, you save the time required to run a Net.Data macro and to access a database in order to create the page.
You can use one Cache Manager per server. Recommendation: Use one Cache Manager for many instances of Net.Data, and multiple caches per Cache Manager.
Figure 26 shows that Net.Data uses a Cache Manager to manage the caching of HTML output from a macro. This output can include data from a database.
![]() |
Net.Data documentation uses the following terms to describe Net.Data caching.
Depending on how many HTTP servers you have on your system, and whether each HTTP server runs its own copy of Net.Data (using separate Net.Data configuration files), you can have all the copies of Net.Data be associated with one Cache Manager or multiple Cache Managers. One Cache Manager can support a number of caches in memory, each cache has a cache identifier called a cache ID. Figure 27 shows one Cache Manager working with multiple macros and managing two caches.
Figure 27. Cache Manager Works with Multiple macros and Caches
![]() |
Any number of items, known as cached pages, can be placed in a cache. Each cached page has a unique identifier, for example a Uniform Resource Locator (URL). A page is a segment of or a complete HTML page.
When Net.Data receives a request for cached data (for example, from the built-in function DTW_CACHE_PAGE), the following steps are taken:
The Cache Manager caches HTML output when the macro successfully completes processing, ensuring that only successfully generated Web pages are cached. The data is not cached until after it has been sent to the browser, and the data that the user sees is the same data that is cached.
When Net.Data encounters an error or exits prematurely from the macro, the Cache Manager: