ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
DocumentLoader Class
DocumentLoader Methods
CacheDocument Method
DiscardCachedDocuments Method
GetCachedDocument Method
LoadDocument Method
LoadDocumentAsync Method

# DocumentLoaderCacheDocument Method

Stores a document in the cache.
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public virtual Document CacheDocument(
    	Document document,
    	bool replace
    )

    Public Overridable Function CacheDocument (
    	document As Document,
    	replace As Boolean
    ) As Document

    public:
    virtual Document^ CacheDocument(
    	Document^ document,
    	bool replace
    )

    abstract CacheDocument :
            document : Document *
            replace : bool -> Document
    override CacheDocument :
            document : Document *
            replace : bool -> Document

#### Parameters

document Document
  The document to store in the cache.
replace Boolean
  True to replace any existing document with the same URI, false otherwise.

#### Return Value

Document
The cached document, which may be different from document if replace is false.
Remarks
A cached document must have an absolute URI.
See Also

#### Reference

DocumentLoader Class
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft