|
|
@@ -8,12 +8,12 @@
|
|
|
<emphasis>'lifetime'</emphasis> directive as seen in the examples; it defines for how long
|
|
|
the cached resource is considered 'fresh'. The third key concept is conditional execution so
|
|
|
that parts of your code can be skipped entirely, boosting performance. The main frontend
|
|
|
- function (eg. <classname>Zend_Cache_Core::get()</classname>) is always designed to return
|
|
|
+ function (eg. <methodname>Zend_Cache_Core::get()</methodname>) is always designed to return
|
|
|
false for a cache miss if that makes sense for the nature of a frontend. That enables
|
|
|
end-users to wrap parts of the code they would like to cache (and skip) in
|
|
|
<emphasis>if(){ ... }</emphasis> statements where the condition is a
|
|
|
<classname>Zend_Cache</classname> method itself. On the end if these blocks you must save
|
|
|
- what you've generated, however (eg. <classname>Zend_Cache_Core::save()</classname>).
|
|
|
+ what you've generated, however (eg. <methodname>Zend_Cache_Core::save()</methodname>).
|
|
|
</para>
|
|
|
<note><para>
|
|
|
The conditional execution design of your generating code is not necessary in some frontends
|
|
|
@@ -59,7 +59,7 @@ $cache = Zend_Cache::factory($frontendName,
|
|
|
parameters to your chosen backends.
|
|
|
</para>
|
|
|
<note><para>
|
|
|
- Always use <classname>Zend_Cache::factory()</classname> to get frontend instances.
|
|
|
+ Always use <methodname>Zend_Cache::factory()</methodname> to get frontend instances.
|
|
|
Instantiating frontends and backends yourself will not work as expected.
|
|
|
</para></note>
|
|
|
</sect2>
|
|
|
@@ -84,14 +84,14 @@ $cache->save($huge_data, 'myUniqueID', array('tagA', 'tagB', 'tagC'));
|
|
|
<sect2 id="zend.cache.clean">
|
|
|
<title>Cleaning the Cache</title>
|
|
|
<para>
|
|
|
- To remove/invalidate in particular cache id, you can use the
|
|
|
+ To remove or invalidate in particular cache id, you can use the
|
|
|
<methodname>remove()</methodname> method :
|
|
|
</para>
|
|
|
<programlisting language="php"><![CDATA[
|
|
|
$cache->remove('idToRemove');
|
|
|
]]></programlisting>
|
|
|
<para>
|
|
|
- To remove/invalidate several cache ids in one operation, you can use the
|
|
|
+ To remove or invalidate several cache ids in one operation, you can use the
|
|
|
<methodname>clean()</methodname> method. For example to remove all cache records :
|
|
|
</para>
|
|
|
<programlisting language="php"><![CDATA[
|