WebCache
Helper class for caching web object.
Constructors
Constructor | Description |
new()
Signature: unit -> WebCache
|
|
Instance members
Instance member | Description |
AddItemWithMetadata(name, content, meta)
Signature: (name:string * content:byte [] * meta:string) -> unit
|
Add a key-value pair of name, content to WebCache, with metadata of content explicitly specified
|
AddRoot(...)
Signature: (path:string * searchPattern:string * searchOption:SearchOption) -> unit
|
Add a directory of files to WebCache. The metadata of the file is determined by file extension.
|
RemoveItem(name)
Signature: name:string -> unit
|
Remove a key-value pair from WebCache
|
Retrieve(name)
Signature: name:string -> byte [] * string
|
Retrieve a content, meta entry from WebCache with key name.
|
SnapShot()
Signature: unit -> KeyValuePair<string,(byte [] * string)> []
|
Provided a snapshot of all entries in the WebCache sorted by key.
|
Static members
Static member | Description |
addItem(name, content)
Signature: (name:string * content:byte []) -> unit
|
Add a key-value pair of name, content to WebCache, the metadata of content is determined by the extension of name,
|
addRoot(...)
Signature: (path:string * searchPattern:string * searchOption:SearchOption) -> unit
|
Add a directory of files to WebCache. The metadata of the file is determined by file extension.
|
retrieve(name)
Signature: name:string -> byte [] * string
|
Retrieve a content, meta entry from WebCache with key name.
|
snapShot()
Signature: unit -> KeyValuePair<string,(byte [] * string)> []
|
Provided a snapshot of all entries in the WebCache sorted by key.
|
TaskReadFile(fileName)
Signature: fileName:string -> Task<string>
|
Read the content of a file using async call, and return Task
|