|
ASPCache Object Reference |
|
See Also: |
The CachedFile object is a thread-safe COM object that caches a file's content and optionally monitors the file for changes. CachedFile objects are stored in ASPCache objects to implement page-fragment caching.
"WebGecko.CachedFile.1"
"WebGecko.CachedFile"
CLSID_CachedFile, found in <ASPCache install dir>\include\ASPCache.h
| Contents | String (r) | Returns the contents of the cached file as a string. |
| MonitoringFileChanges | Boolean (r) | Returns true if the cached file is being monitored for changes. |
| Open() | Opens a file, and caches its contents. |
| Write() | Writes the contents of the cached file to the ASP Response object. |
CachedFile objects are used for page fragment caching, but they can also be accessed directly:
' This code snippet assumes that
fragments/frag.htm was previously cached using Cache.WriteFile
' Retrieve the CachedFile object
Dim oCachedFile
Set oCachedFile =
Cache("fragments/frag.htm")
' Read the CachedFile object's properties
Dim sContents, bMonitoringFileChanges
sContents = oCachedFile.Contents
bMonitoringFileChanges = oCachedFile.MonitoringFileChanges