aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type
diff options
context:
space:
mode:
Diffstat (limited to 'type')
-rw-r--r--type/Default.class.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/type/Default.class.php b/type/Default.class.php
index ad880b3..ade3a16 100644
--- a/type/Default.class.php
+++ b/type/Default.class.php
@@ -5,6 +5,7 @@
5class Type_Default { 5class Type_Default {
6 var $datadir; 6 var $datadir;
7 var $rrdtool; 7 var $rrdtool;
8 var $cache;
8 var $args; 9 var $args;
9 var $seconds; 10 var $seconds;
10 var $data_sources = array('value'); 11 var $data_sources = array('value');
@@ -25,6 +26,7 @@ class Type_Default {
25 function __construct($config) { 26 function __construct($config) {
26 $this->datadir = $config['datadir']; 27 $this->datadir = $config['datadir'];
27 $this->rrdtool = $config['rrdtool']; 28 $this->rrdtool = $config['rrdtool'];
29 $this->cache = $config['cache'];
28 $this->parse_get(); 30 $this->parse_get();
29 $this->rrd_files(); 31 $this->rrd_files();
30 $this->identifiers = $this->file2identifier($this->files); 32 $this->identifiers = $this->file2identifier($this->files);
@@ -114,7 +116,8 @@ class Type_Default {
114 116
115 if(!$debug) { 117 if(!$debug) {
116 # caching 118 # caching
117 header("Expires: " . date(DATE_RFC822,strtotime("90 seconds"))); 119 if (is_numeric($this->cache) && $this->cache > 0)
120 header("Expires: " . date(DATE_RFC822,strtotime($this->cache." seconds")));
118 header("content-type: image/png"); 121 header("content-type: image/png");
119 $graphdata = implode(' ', $graphdata); 122 $graphdata = implode(' ', $graphdata);
120 echo `$graphdata`; 123 echo `$graphdata`;