Skip to content
Permalink
Browse files

Updating API docs related to DboSource::$cacheMethods. Fixes #870

  • Loading branch information...
markstory committed Jun 30, 2010
1 parent 735ac17 commit e023350af57e07ac3351ab86c07361697fc1b369
Showing with 14 additions and 2 deletions.
  1. +14 −2 cake/libs/model/datasources/dbo_source.php
@@ -53,7 +53,10 @@ class DboSource extends DataSource {
var $alias = 'AS ';
/**
* Caches result from query parsing operations
* Caches result from query parsing operations. Cached results for both DboSource::name() and
* DboSource::conditions() will be stored here. Method caching uses `crc32()` which is
* fast but can collisions more easily than other hashing algorithms. If you have problems
* with collisions, set DboSource::$cacheMethods to false.
*
* @var array
* @access public
@@ -512,7 +515,12 @@ function cacheMethod($method, $key, $value = null) {
* Returns a quoted name of $data for use in an SQL statement.
* Strips fields out of SQL functions before quoting.
*
* @param string $data
* Results of this method are stored in a memory cache. This improves performance, but
* because the method uses a simple hashing algorithm it can infrequently have collisions.
* Setting DboSource::$cacheMethods to false will disable the memory cache.
*
* @param mixed $data Either a string with a column to quote. An array of columns to quote or an
* object from DboSource::expression() or DboSource::identifier()
* @return string SQL field
* @access public
*/
@@ -2050,6 +2058,10 @@ function fields(&$model, $alias = null, $fields = array(), $quote = true) {
* conditions are provided those conditions will be parsed and quoted. If a boolean
* is given it will be integer cast as condition. Null will return 1 = 1.
*
* Results of this method are stored in a memory cache. This improves performance, but
* because the method uses a simple hashing algorithm it can infrequently have collisions.
* Setting DboSource::$cacheMethods to false will disable the memory cache.
*
* @param mixed $conditions Array or string of conditions, or any value.
* @param boolean $quoteValues If true, values should be quoted
* @param boolean $where If true, "WHERE " will be prepended to the return value

0 comments on commit e023350

Please sign in to comment.
You can’t perform that action at this time.