summaryrefslogtreecommitdiff
path: root/lib/action.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/action.php')
-rw-r--r--lib/action.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/action.php b/lib/action.php
index 0b1cef365..31ae49881 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -1004,10 +1004,30 @@ class Action extends HTMLOutputter // lawsuit
}
}
}
+
+ if ($this->isCacheable()) {
+ header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' );
+ header( "Cache-Control: private, must-revalidate, max-age=0" );
+ }
}
}
/**
+ * Is this action cacheable?
+ *
+ * If the action returns a last-modified
+ *
+ * @param array $argarray is ignored since it's now passed in in prepare()
+ *
+ * @return boolean is read only action?
+ */
+
+ function isCacheable()
+ {
+ return true;
+ }
+
+ /**
* HasĀ etag? (private)
*
* @param string $etag etag http header