* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class DiskCachePlugin extends Plugin
{
+ const PLUGIN_VERSION = '2.0.0';
+
var $root = '/tmp';
function keyToFilename($key)
*
* @return boolean hook success
*/
-
function onStartCacheGet(&$key, &$value)
{
$filename = $this->keyToFilename($key);
*
* @return boolean hook success
*/
-
function onStartCacheSet(&$key, &$value, &$flag, &$expiry, &$success)
{
$filename = $this->keyToFilename($key);
*
* @return boolean hook success
*/
-
function onStartCacheDelete(&$key, &$success)
{
$filename = $this->keyToFilename($key);
Event::handle('EndCacheDelete', array($key));
return false;
}
-}
+ function onPluginVersion(array &$versions)
+ {
+ $versions[] = array('name' => 'DiskCache',
+ 'version' => self::PLUGIN_VERSION,
+ 'author' => 'Evan Prodromou',
+ 'homepage' => 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/DiskCache',
+ 'rawdescription' =>
+ // TRANS: Plugin description.
+ _m('Plugin to implement cache interface with disk files.'));
+ return true;
+ }
+}