[Symplus Wiki]
Cache plugin
Cache plugin
This DokuWiki plugin provides a cache mechanism to plugins which needs to store cache files for its own. This plugin uses a 'media' directory to save cache files.
| Download | cache.zip(1.9KB) | 2008-11-26 |
|---|
plugin_cache class
constructor
#Example
$c = new plugin_cache("namespace","prefix","txt.gz")
properties
| namespace | Namespace to store cache files | |
|---|---|---|
| mediaDir | Media directory path | |
| mediaFormat | String format to make a cache path | |
| linkFormat | String format to make a link (Dokuwiki ID) | |
| prefix | Prefix for cache files | |
| extension | Extension for cache files. You can use gz for automatic gzip/ungzip. | |
functions
| Exists($id) | True if the cache exists |
|---|---|
| GetMediaPath($id) | Get a media path for cache ID |
| GetMediaLink($id) | Get a link URL to fetch a cache |
| GetMediaText($id) | Get a text of cache file |
| PutMediaText($id,$text) | Save string to cache |
| CheckDir() | Check and make a cache directory called in constructor |
| ClearCache() | Clear all cache files in a namespace |
| RemoveDir() | Clear and remove cache directory |
Plugins using this plugin
History
- 2008.11.26
- Unnecessary page directory was abolished.
- 2008.5.14
- Bug fix for some incorrect media directory path creation.
- 2008.4.18
- Bug fix for some incorrect media links with ':'
- 2008.3.22
- First version was uploaded.
Except where otherwise noted, content of this page (inside border) is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported