summaryrefslogtreecommitdiffstats
path: root/user_guide
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2010-09-28 20:14:57 +0200
committerDerek Jones <derek.jones@ellislab.com>2010-09-28 20:14:57 +0200
commitd76334998db618d4633886bbcecc84658b50ab23 (patch)
treebfcf3cd6efafaf355d18fb539790e1413f667437 /user_guide
parente77162b9d3233cf6de1f4830262b79b3c2235ed3 (diff)
fixed a bug where the Output class would send incorrect cached data for controllers implementing their own _output() methods
Diffstat (limited to 'user_guide')
-rw-r--r--user_guide/changelog.html1
-rw-r--r--user_guide/general/controllers.html11
2 files changed, 11 insertions, 1 deletions
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index fb533b082..58fd78008 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -162,6 +162,7 @@ Hg Tag: </p>
<h3>Bug fixes for 2.0.0</h3>
<ul>
+ <li>Fixed a bug where the Output class would send incorrect cached output for controllers implementing their own <dfn>_output()</dfn> method.</li>
<li>Fixed a bug where a failed query would not have a saved query execution time causing errors in the Profiler</li>
<li>Fixed a bug that was writing log entries when multiple identical helpers and plugins were loaded.</li>
<li>Fixed assorted user guide typos or examples (#10693, #8951, #7825, #8660, #7883, #6771, #10656).</li>
diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html
index 9658df876..2020011d9 100644
--- a/user_guide/general/controllers.html
+++ b/user_guide/general/controllers.html
@@ -268,7 +268,16 @@ function _output($output)<br />
<p class="important">Please note that your <dfn>_output()</dfn> function will receive the data in its finalized state. Benchmark and memory usage data will be rendered,
cache files written (if you have caching enabled), and headers will be sent (if you use that <a href="../libraries/output.html">feature</a>)
-before it is handed off to the _output() function. If you are using this feature the page execution timer and memory usage stats might not be perfectly accurate
+before it is handed off to the _output() function.<br />
+<br />
+To have your controller's output cached properly, its <dfn>_output()</dfn> method can use:<br />
+
+<code>if ($this-&gt;output-&gt;cache_expiration &gt; 0)<br />
+{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;output-&gt;write_cache($output);<br />
+}</code>
+
+If you are using this feature the page execution timer and memory usage stats might not be perfectly accurate
since they will not take into acccount any further processing you do. For an alternate way to control output <em>before</em> any of the final processing is done, please see
the available methods in the <a href="../libraries/output.html">Output Class</a>.</p>