فهرست منبع

Zend_Cache_Manager: Added some docs for the Zend_Application_Resource_CacheManager class

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19854 44c647ce-9c0f-0410-b52a-842ac1e357ba
padraic 16 سال پیش
والد
کامیت
f8082c9580

+ 44 - 0
documentation/manual/en/module_specs/Zend_Application-AvailableResources-CacheManager.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Reviewed: no -->
+<sect2 id="zend.application.available-resources.cachemanager">
+    <title>Zend_Application_Resource_CacheManager</title>
+
+    <para>
+        <classname>Zend_Application_Resource_CacheManager</classname> may be
+        utilised to configure a set of <classname>Zend_Cache</classname> option
+        bundles for use when lazy loading caches using
+        <classname>Zend_Cache_Manager</classname>
+    </para>
+
+    <para>
+        As the Cache Manager is a lazy loading mechanism, the options are translated
+        to option templates used to instantiate a cache object on request.
+    </para>
+
+    <example id="zend.application.available-resources.cachemanager.configExample">
+        <title>Sample Cache Manager resource configuration</title>
+
+        <para>
+            Below is a sample <acronym>INI</acronym> file showing how
+            <classname>Zend_Cache_Manager<classname> may be configured. The format
+            is the CacheManager resource prefix (resources.cacheManager) followed
+            be the name to assign to an option cache template/bundle (e.g.
+            resources.cacheManager.database) and finally followed by a typical
+            <classname>Zend_Cache</classname> option.
+        </para>
+
+        <programlisting language="ini"><![CDATA[
+resources.cacheManager.database.frontend.name = Core
+resources.cacheManager.database.frontend.options.lifetime = 7200
+resources.cacheManager.database.frontend.options.automatic_serialization = true
+resources.cacheManager.database.backend.name = File
+resources.cacheManager.database.backend.options.cache_dir = "/path/to/cache"
+]]></programlisting>
+
+        <para>
+            Actually retrieving this cache from the Cache Manager is as simple as
+            accessing an instance of the Manager and calling
+            <methodname>$cacheManager->getCache('database');</methodname>.  
+        </para>
+    </example>
+</sect2>

+ 1 - 0
documentation/manual/en/module_specs/Zend_Application-AvailableResources.xml

@@ -8,6 +8,7 @@
         available by default in <classname>Zend_Application</classname>.
     </para>
 
+    <xi:include href="Zend_Application-AvailableResources-CacheManager.xml" />
     <xi:include href="Zend_Application-AvailableResources-Db.xml" />
     <xi:include href="Zend_Application-AvailableResources-Frontcontroller.xml" />
     <xi:include href="Zend_Application-AvailableResources-Layout.xml" />