Skip to content

Commit 31e82b0

Browse files
committed
More documentation for Cache.
1 parent 20299c9 commit 31e82b0

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

cake/libs/cache.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,24 @@ class Cache {
7171
* both create new configurations, return the settings for already configured
7272
* configurations.
7373
*
74-
* To create a new configuration:
74+
* To create a new configuration, or to modify an existing configuration permanently:
7575
*
7676
* `Cache::config('my_config', array('engine' => 'File', 'path' => TMP));`
7777
*
78-
* To get the settings for a configuration, and set it as the currently selected configuration
78+
* If you need to modify a configuration temporarily, use Cache::set().
79+
* To get the settings for a configuration:
7980
*
8081
* `Cache::config('default');`
8182
*
83+
* There are 4 built-in caching engines:
84+
*
85+
* - `FileEngine` - Uses simple files to store content. Poor performance, but good for
86+
* storing large objects, or things that are not IO sensitive.
87+
* - `ApcEngine` - Uses the APC object cache, one of the fastest caching engines.
88+
* - `MemcacheEngine` - Uses the PECL::Memcache extension and Memcached for storage.
89+
* Fast reads/writes, and benefits from memcache being distributed.
90+
* - `XcacheEngine` - Uses the Xcache extension, an alternative to APC.
91+
*
8292
* @see app/config/core.php for configuration settings
8393
* @param string $name Name of the configuration
8494
* @param array $settings Optional associative array of settings passed to the engine

cake/libs/cache/file.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<?php
22
/**
3-
* File Storage engine for cache
3+
* File Storage engine for cache. Filestorage is the slowest cache storage
4+
* to read and write. However, it is good for servers that don't have other storage
5+
* engine available, or have content which is not performance sensitive.
46
*
7+
* You can configure a FileEngine cache, using Cache::config()
58
*
69
* PHP 5
710
*

0 commit comments

Comments
 (0)