From 19d26a9982bc595610dbe8046fcba2369137477a Mon Sep 17 00:00:00 2001 From: LogMANOriginal Date: Sun, 2 Oct 2016 15:50:31 +0200 Subject: [PATCH] [BridgeAbstract] Replace getCacheDuration() with CACHE_TIMEOUT --- BridgeAbstract.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/BridgeAbstract.md b/BridgeAbstract.md index b6a8808..0a182bf 100644 --- a/BridgeAbstract.md +++ b/BridgeAbstract.md @@ -5,7 +5,6 @@ To create a new Bridge extending `BridgeAbstract` you must specify some [basic m - [`collectData`](#the-collectdata-function) (**required**) - [`getName`](#the-getname-function) - [`getURI`](#the-geturi-function) -- [`getCacheDuration`](#the-getcacheduration-function) Find a [template](#template) at the end of this file. @@ -19,6 +18,7 @@ const URI // URI to the target website of the bridge ("http://....") const DESCRIPTION // A brief description of the Bridge const MAINTAINER // Name of the maintainer const PARAMETERS // (optional) Definition of additional parameters +const CACHE_TIMEOUT // (optional) Defines the maximum duration for the cache in seconds (default: 3600) ``` Find a description of `const PARAMETERS` [below](#parameters) @@ -191,18 +191,6 @@ This function returns the URI to the destination site of the bridge. It will be } ``` -## The `getCacheDuration` function - -This function returns the time in **seconds** during which rss-bridge will output cached values instead of re-generating a RSS feed. - -**Notice:** **RSS-Bridge** will return `3600` seconds (1 hour) by default, so you only have to implement this function if you require different timing! - -```PHP - public function getCacheDuration(){ - return 3600; // 1 hour - } -``` - # Bridge Abstract functions All bridges extend from `BridgeAbstract` and therefore are able to make use of functions defined in `BridgeAbstract`. @@ -277,6 +265,7 @@ class MySiteBridge extends BridgeAbstract { const DESCRIPTION = 'No description provided'; const MAINTAINER = 'No maintainer'; const PARAMETERS = array(); + const CACHE_TIMEOUT = 3600; public function collectData(){ // Implement your bridge here!