more unittests and updated documentation for extensions.  Fixed bug in optimizer that caused blocks to be optimized away under some circumstances.

--HG--
branch : trunk
diff --git a/docs/api.rst b/docs/api.rst
index 5b9e5ad..d520b40 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -109,7 +109,7 @@
     .. automethod:: stream([context])
 
 
-.. autoclass:: jinja2.environment.TemplateStream
+.. autoclass:: jinja2.environment.TemplateStream()
     :members: disable_buffering, enable_buffering
 
 
@@ -154,7 +154,7 @@
 The Context
 -----------
 
-.. autoclass:: jinja2.runtime.Context
+.. autoclass:: jinja2.runtime.Context()
     :members: resolve, get_exported, get_all
 
     .. attribute:: parent
diff --git a/docs/extensions.rst b/docs/extensions.rst
index d499192..8ea554a 100644
--- a/docs/extensions.rst
+++ b/docs/extensions.rst
@@ -92,19 +92,19 @@
 .. _Babel: http://babel.edgewall.org/
 
 
-do
-~~
+Expression Statement
+--------------------
 
 **Import name:** `jinja2.ext.do`
 
-The do aka expression-statement extension adds a simple `do` tag to the
+The "do" aka expression-statement extension adds a simple `do` tag to the
 template engine that works like a variable expression but ignores the
 return value.
 
 .. _loopcontrols-extension:
 
-loopcontrols
-~~~~~~~~~~~~
+Loop Controls
+-------------
 
 **Import name:** `jinja2.ext.loopcontrols`
 
@@ -149,6 +149,17 @@
     env = Environment(extensions=[FragmentCacheExtension])
     env.fragment_cache = SimpleCache()
 
+Inside the template it's then possible to mark blocks as cacheable.  The
+following example caches a sidebar for 300 seconds:
+
+.. sourcecode:: html+jinja
+
+    {% cache 'sidebar', 300 %}
+    <div class="sidebar">
+        ...
+    </div>
+    {% endcache %}
+
 .. _Werkzeug: http://werkzeug.pocoo.org/
 
 Extension API