Author: Derick Rethans Date: 2006-01-25 10:18:54 +0100 (Wed, 25 Jan 2006) New Revision: 2024
Log: - Review of Cache tutorial - Added extra header "More Information" Modified: packages/Archive/trunk/docs/tutorial.txt packages/Cache/trunk/docs/tutorial.txt packages/ConsoleTools/trunk/docs/tutorial.txt packages/Execution/trunk/docs/tutorial.txt Modified: packages/Archive/trunk/docs/tutorial.txt =================================================================== --- packages/Archive/trunk/docs/tutorial.txt 2006-01-25 09:11:57 UTC (rev 2023) +++ packages/Archive/trunk/docs/tutorial.txt 2006-01-25 09:18:54 UTC (rev 2024) @@ -38,9 +38,9 @@ ============ This tutorial assumes that you have set-up an eZ components environment. For -information on how to do this, please refer to the ComponentsIntroduction_. +information on how to do this, please refer to the `Components Introduction`_. -.. _ComponentsIntroduction: http://ez.no/community/articles/an_introduction_to_ez_components +.. _`Components Introduction`: http://ez.no/community/articles/an_introduction_to_ez_components Use cases @@ -113,7 +113,11 @@ .. include:: tutorial_replacing.php :literal: +More Information +================ +For more information, see the ezcArchive API documentation. + .. Local Variables: Modified: packages/Cache/trunk/docs/tutorial.txt =================================================================== --- packages/Cache/trunk/docs/tutorial.txt 2006-01-25 09:11:57 UTC (rev 2023) +++ packages/Cache/trunk/docs/tutorial.txt 2006-01-25 09:18:54 UTC (rev 2024) @@ -17,12 +17,12 @@ used directly. ezcCacheManager - This is the manager, which will take care of your caches, if you like. It is - useful to use the manager, if your application needs to cache different data - for different purposes. It allows you to configure all needed caches in a - central place and to retrieve them from the ezcCacheManager, when needed. The - cache manager will store only the configurations and first and only - instantiate the cache object itself, when you request it for use. + This is the manager, which will take care of your caches. It is optional to + use the manager, but recommended if your application needs to cache different + data for different purposes. It allows you to configure all needed caches in + a central place and to retrieve them through the ezcCacheManager. The cache + manager will store only the configurations at first and only instantiate the + cache object itself when you request it for use. ezcCacheStorage This is the base class for all cache storages (the cache classes themselves). @@ -30,24 +30,24 @@ ezcCacheStorageFilePlain Cache objects of this class are capable to store plain text data on the file - system. It utilizes the file_get_contents() and file_put_contents functions + system. It utilizes the file_get_contents() and file_put_contents() functions of PHP. ezcCacheStorageFileArray In contrast to ezcCacheStorageFilePlain, objects of this class can store - array structures beside plain text data and will keep PHP data types intact. + array structures and will keep PHP data types intact. The ezcCacheStorageFileArray class generates PHP code, which will be stored - on the file system and simply be required again for restoring the data. + on the file system. Restoring data from the cache uses the require() + construct. ezcCacheStorageFileEvalArray - Objects of this storage class follow a similar approach that - ezcCacheStorageFileArray does and is also capable of storing array + Objects of this storage class follow a similar approach like + ezcCacheStorageFileArray and is also capable of storing array structures. The major difference between both classes is, that ezcCacheStorageFileEvalArray will use PHPs eval() method to restore the - cached data, instead of requiring the stored source. This has the effect, - that the stored data will not be cached again in PHP accelerators like APC_ - (which maybe desirable, if you store large amounts of data at once, to not - pollute your APC cache). + cached data, instead of using required() to restore the cache data. This has the effect, + that the stored data will not be cached again in PHP accelerators like APC_. + This might be desirable, if you store large amounts of data at once. .. _APC: http://pecl.php.net/package/APC @@ -55,9 +55,9 @@ ============ This tutorial assumes that you have set-up an eZ components environment. For -information on how to do this, please refer to the ComponentsIntroduction_. +information on how to do this, please refer to the `Components Introduction`_. -.. _ComponentsIntroduction: http://ez.no/community/articles/an_introduction_to_ez_components +.. _`Components Introduction`: http://ez.no/community/articles/an_introduction_to_ez_components Usage @@ -73,7 +73,7 @@ :literal: In the options for the cache to create, the time-to-life is defined. If left -out, the cache has a lifetime of 24 hrs. In this place, a lifetime of 30 +out, the cache has a lifetime of 24 hours. In this place, a lifetime of 30 seconds is defined. On line 9 the cache configuration is stored in the cache manager. The cache created will be named "simple" and will reside in the directory /tmp/cache/plain (Note: This directory must exists and must be writable to @@ -110,11 +110,11 @@ except that the program will sleep for 2 seconds, when it generated new data for the plain cache, to show different generation times in the 2 caches. -On line 30 the second cache is retrieved, which is capable of storing arrays. +On line 30 the second cache object is retrieved, which is capable of storing arrays. Therefore, we store the data from the plain cache here and additionally generate some more data, all stored in an array. Running this example multiple times will give you different results now after some time, since the second cache -has a longer lifetime and will therefore hold it's data longer than the first one. +has a longer lifetime and will therefore hold its data longer than the first one. Complex caching --------------- @@ -133,7 +133,7 @@ cached data later on, too. In line 20 a foreach loop starts, which stores all example data in the cache. After -that (line 36) the method ezcCacheStorageiFile::countDataItems() is used to let +that the method ezcCacheStorageFile::countDataItems() is used to let the storage object count it's data items. The first parameter here would be an ID. When this is set, the method should always return 1 or 0, because only 1 data item per ID may exist. Instead, the data items with a specific attribute @@ -142,11 +142,16 @@ "section" set to "articles". The second call (line 32) should return 2, because 2 data items have the attribute "language" set to the value "de". -On line 36, the storage object is told to delete all cache items, which have +On line 36 the storage object is told to delete all cache items, which have the attribute "language" set to "de". Therefore the next to calls to -ezcCacheStorageiFile::countDataItems() will return 2 and 0. +ezcCacheStorageFile::countDataItems() will return 2 and 0. +More Information +================ +For more information, see the ezcCacheManager and ezcCacheStorageFile API +documentation. + .. Local Variables: Modified: packages/ConsoleTools/trunk/docs/tutorial.txt =================================================================== --- packages/ConsoleTools/trunk/docs/tutorial.txt 2006-01-25 09:11:57 UTC (rev 2023) +++ packages/ConsoleTools/trunk/docs/tutorial.txt 2006-01-25 09:18:54 UTC (rev 2024) @@ -345,9 +345,10 @@ .. image:: img/consoletools_tutorial_example_10.png -For more information, see the ezcConsoleTable_ API documentation. +More Information +================ -.. _ezcConsoleTable: http://ez.no/doc/components/view/(file)/1.0rc1/ConsoleTools/ezcConsoleTable.html +For more information, see the ezcConsoleTable API documentation. .. Modified: packages/Execution/trunk/docs/tutorial.txt =================================================================== --- packages/Execution/trunk/docs/tutorial.txt 2006-01-25 09:11:57 UTC (rev 2023) +++ packages/Execution/trunk/docs/tutorial.txt 2006-01-25 09:18:54 UTC (rev 2024) @@ -92,6 +92,9 @@ This application did not succesfully finish its request. The reason was: Unclean Exit - ezcExecution::cleanExit() was not called. +More Information +================ + For more information, see the ezcExecution API documentation. -- svn-components mailing list [email protected] http://lists.ez.no/mailman/listinfo/svn-components
