When planning your use of the Net.Data cache functions you must
consider:
- What pages would benefit from caching and the performance improvements
that would be gained
- When to cache the items
- When to refresh the items in the cache and the refresh methods to use
To use Net.Data caching, you need to complete the following steps,
which require knowing how you want to use caching.
Recommendation: Before embarking on a major application
that uses caching, we strongly urge you to plan and prototype your application
prior to putting it into production.
- Install Net.Data, which includes the caching function.
- Configure the Cache Manager. See Configuring the Cache Manager and Net.Data Caches.
- Determine how you are going to put the Net.Data application into
production.
- Check the various Net.Data cache logs to determine whether
improvements in the use of the cache and the way it is configured should be
made.
The Cache Manager does not cache Web pages when Net.Data
encounters internal errors that cause it to exit the macro before processing
is complete. Cache Manager does not cache pages that are incomplete or
contain Net.Data errors. These types of errors include macro
syntax errors and SQL errors.
Pages with errors can be cached when:
- Net.Data encounters an error and Net.Data continues to
execute the macro because of a CONTINUE configuration variable in a message
block and terminates normally.
- Errors occur outside of the Net.Data's error determination
scope, such as database rollbacks.
You need to plan for two types of identifiers when designing caching for
your application.
- Identifier for a cache: This identifier is the cache ID
and specifies the name in the configuration file stanza that defines the
cache. You can use many approaches for classifying and naming your
caches. For example, you can name the cache by application. You
could have a cache for each of your Net.Data applications, giving each
cache a name that is derived from the Net.Data macro it
serves.
- Identifier for the cached page: This identifier is the
cached page ID and specifies the name of the page to be cached. The
cached page ID can be any string, such as an URL address. You specify
the identifier with the DTW_CACHE_PAGE() built-in function. See the
built-in functions chapter of Net.Data Reference for syntax
and examples.
[ Top of Page | Previous Page | Next Page | Index ]