This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via c3728ed49cd2993b7963d40fc39ccb2a4813bcaa (commit)
from 2259653f161fd3e385c2578baed5b1684c4101c3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c3728ed49cd2993b7963d40fc39ccb2a4813bcaa
Author: Ivan Borzenkov <iva...@li...>
Date: Fri Jun 25 00:21:50 2010 +0400
Генерация опций файлового кеша из файла
diff --git a/QFW/Cacher/File.php b/QFW/Cacher/File.php
index 9bc8847..1a07e4e 100644
--- a/QFW/Cacher/File.php
+++ b/QFW/Cacher/File.php
@@ -7,36 +7,22 @@ class Cacher_File implements Zend_Cache_Backend_Interface
{
protected $options = array(
- 'cacheDir' => '',
- 'caching' => true,
- 'prefix' => 'cache_',
- 'lifeTime' => 3600,
- 'fileLocking' => true,
- 'writeControl' => false,
- 'readControl' => false,
- 'fileNameProtection' => false,
- 'automaticCleaningFactor' => 0,
- 'hashedDirectoryLevel' => 0,
- 'hashedDirectoryUmask' => 0777,
+ 'cacheDir' => '', //directory where to put the cache files (string),
+ 'caching' => true, //enable / disable caching (boolean),
+ 'prefix' => 'cache_', //file name prefix (string),
+ 'lifeTime' => 3600, //cache lifetime in seconds (int),
+ 'fileLocking' => true, //enable / disable fileLocking (boolean),
+ 'writeControl' => false, //enable / disable write control (boolean),
+ 'readControl' => false, //enable / disable read control (boolean),
+ 'fileNameProtection' => false, //enable / disable automatic file name protection (boolean),
+ 'automaticCleaningFactor' => 0, //distable / tune automatic cleaning process (int),
+ 'hashedDirectoryLevel' => 0, //level of the hashed directory system (int),
+ 'hashedDirectoryUmask' => 0777, //umask for hashed directory structure (int),
);
/**
* Constructor
*
- * $options is an assoc. Available options are :
- * $options = array(
- * 'cacheDir' => directory where to put the cache files (string),
- * 'caching' => enable / disable caching (boolean),
- * 'lifeTime' => cache lifetime in seconds (int),
- * 'fileLocking' => enable / disable fileLocking (boolean),
- * 'writeControl' => enable / disable write control (boolean),
- * 'readControl' => enable / disable read control (boolean),
- * 'fileNameProtection' => enable / disable automatic file name protection (boolean),
- * 'automaticCleaningFactor' => distable / tune automatic cleaning process (int),
- * 'hashedDirectoryLevel' => level of the hashed directory system (int),
- * 'hashedDirectoryUmask' => umask for hashed directory structure (int),
- * );
- *
* @param array $options options
* @access public
*/
diff --git a/doc/asciidoc/cache.txt b/doc/asciidoc/cache.txt
index 8697309..dabbac6 100644
--- a/doc/asciidoc/cache.txt
+++ b/doc/asciidoc/cache.txt
@@ -15,20 +15,7 @@
[source, php]
-------------------------------------------
-$options = array(
- 'cacheDir' => '',
- 'caching' => true,
- 'prefix' => 'cache_',
- 'lifeTime' => 3600,
- 'fileLocking' => true,
- 'writeControl' => false,
- 'readControl' => false,
- 'fileNameProtection' => true,
- 'automaticSerialization' => true,
- 'automaticCleaningFactor' => 0,
- 'hashedDirectoryLevel' => 0,
- 'hashedDirectoryUmask' => 0777,
-);
+sys::[cat ../../QFW/Cacher/File.php | sed '/protected $options =/,/);/!d; s/^\t//; s/^protected //']
-------------------------------------------
По умолчанию кеш хранится в папке tmp/cache, однако можно переопределить это значение. Указание другого префикса позволит хранить в одной папке несколько кешеров с различными параметрами.
-----------------------------------------------------------------------
Summary of changes:
QFW/Cacher/File.php | 36 +++++++++++-------------------------
doc/asciidoc/cache.txt | 15 +--------------
2 files changed, 12 insertions(+), 39 deletions(-)
hooks/post-receive
--
quickfw
|