Dokuwiki for science




cache_plugin [2016/10/31 08:44]
cache_plugin [2016/10/31 08:44] (現在)
ライン 1: ライン 1:
 +======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.
 +:!: This plugin is deprecated :!:
 +=====plugin_cache class=====
 +  #Example
 +  $c = new plugin_cache("​namespace","​prefix","​txt.gz"​)
 +^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.|
 +^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=====
 +  *[[slideshow_plugin]]
 +  *[[chart_plugin]](old version)
 +  *[[aviewer_plugin]]
 +  *[[pdb_plugin]]
 +  *[[pubchem_plugin]]
 +  *[[pubmed_plugin]]
 +  *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.
 +{{tag>​dokuwiki plugin}}