| Vendor | MindTouch |
| Type | Native |
| Categories | Misc |
| Requires | MindTouch 9.02 or later |
| OS Restriction | None |
| Status | Stable |
| License | Free/Open Source |
| SID (service id) | sid://mindtouch.com/2009/02/extension/webcache |
| Assembly | mindtouch.deki.services |
Install Extension
Table of Contents
The WebCache service replicates a number of functions built into DekiScript in the web namespace. The only visible difference between the regular functions and their webcache counterparts is that the cache ttl parameter has a minimum of 300 (5 minutes) and no upper bound. Functionally, webcache will store cached documents on disk rather than memory, although documents are kept temporarily in memory so that frequent accesses do not have to incur disk overhead on each subsequent calls.
See also How to add an extension, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.
The WebCache does not require any additional configuration, but its behavior can be altered with the following keys
| Config Key | Description |
| max-size | Maximum size (in bytes) of documents that can be cached |
| memory-cache-time | Amount of time a document added to the disk cache or retrieved from the disk cache remains in memory before it has to be re-fetched from disk |
As for every extension, the webcache extension can be added several times, e.g. for different servers. To accomplish this, set the service preference "namespace". If it is set e.g. to "mysvn", the subversion service is being invoked by mysvn.table(...). If all repositories are on the same server, this is not needed, use the parameter "path" (see below) for this.
Removes the document source from the disk cache
Parameters:
| Name | Type | Description |
| source | uri | Uri of the document to remove from the disk cache |
Counterpart to web.Html
Counterpart to web.Json
Counterpart to web.List
Counterpart to web.Text
Counterpart to web.Xml
Version: 9.08 or later
Store any DekiScript variable or output of any DekiScript function for later retrieval. The storage is a cache, i.e. it is not meant as persistent storage, and values will be removed from the cache once the ttl expires. Storing a value at an existing id, will overwrite the current value and reset the cache expiration.
Parameters:
| Name | Type | Description |
| id | str | a unique identifier for the document to be stored |
| document | any | any DekiScript value to be stored |
| ttl | num | (optional, range: 300+, default: 300) Caching duration in seconds |
Output: any (the document submitted for storage)
Version: 9.08 or later
Retrieve a previously stored value from the cache
Parameters:
| Name | Type | Description |
| id | str | the unique identifier for the document provided at storage time |
Output: any (the document submitted via webcache.store() )
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by