diff --git a/lib/Doctrine/Adapter/Statement/Interface.php b/lib/Doctrine/Adapter/Statement/Interface.php index d028b7cce..3a22d57c8 100644 --- a/lib/Doctrine/Adapter/Statement/Interface.php +++ b/lib/Doctrine/Adapter/Statement/Interface.php @@ -133,7 +133,7 @@ interface Doctrine_Adapter_Statement_Interface * bound parameters in the SQL statement being executed. * @return boolean Returns TRUE on success or FALSE on failure. */ - public function execute(array $params = array()); + public function execute($params = null); /** * fetch * diff --git a/lib/Doctrine/Cache.php b/lib/Doctrine/Cache.php index 1f9807526..2aec1a010 100644 --- a/lib/Doctrine/Cache.php +++ b/lib/Doctrine/Cache.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * . */ +Doctrine::autoload('Doctrine_Db_EventListener'); /** * Doctrine_Cache * @@ -234,7 +235,7 @@ class Doctrine_Cache extends Doctrine_Db_EventListener implements Countable, Ite while ($i--) { $element = next($stats); $query = key($stats); - + $hash = md5($query); $this->_driver->delete($hash); diff --git a/lib/Doctrine/Db.php b/lib/Doctrine/Db.php index 2ef5c1a94..750ab65a8 100644 --- a/lib/Doctrine/Db.php +++ b/lib/Doctrine/Db.php @@ -428,7 +428,9 @@ class Doctrine_Db implements Countable, IteratorAggregate, Doctrine_Adapter_Inte if ( ! empty($params)) { $stmt = $this->dbh->prepare($statement); + return $stmt->execute($params); + } else { if ( ! $skip) { $stmt = $this->dbh->query($statement); diff --git a/lib/Doctrine/Db/Statement.php b/lib/Doctrine/Db/Statement.php index 13cc79e39..20c03e77a 100644 --- a/lib/Doctrine/Db/Statement.php +++ b/lib/Doctrine/Db/Statement.php @@ -52,7 +52,7 @@ class Doctrine_Db_Statement implements Doctrine_Adapter_Statement_Interface } public function getStatement() { - return $this->stmt; + return $this->stmt; } public function getQuery() { @@ -194,7 +194,7 @@ class Doctrine_Db_Statement implements Doctrine_Adapter_Statement_Interface * bound parameters in the SQL statement being executed. * @return boolean Returns TRUE on success or FALSE on failure. */ - public function execute(array $params = array()) + public function execute($params = null) { $event = new Doctrine_Db_Event($this, Doctrine_Db_Event::EXECUTE, $this->stmt->queryString, $params); diff --git a/manual/docs/Caching - Availible options.php b/manual/docs/Caching - Availible options.php new file mode 100644 index 000000000..a59fb9816 --- /dev/null +++ b/manual/docs/Caching - Availible options.php @@ -0,0 +1,12 @@ +Doctrine_Cache offers many options for performance fine-tuning: +