Ok, Postgress and Sqlserver both pass $quote = false through to
DboSource::fields() which makes it not cache the method result.

I have added a skip to the test now for Postgres and Sqlserver

Andy


On 27 September 2013 12:22, Frank de Graaf <notifications@github.com> wrote:

> In lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php:
>
> > + */
> > +	public function testFieldsCacheKeyWithSchemanameChange() {
> > +		Cache::delete('method_cache', '_cake_core_');
> > +		DboSource::$methodCache = array();
> > +		$Article = ClassRegistry::init('Article');
> > +
> > +		$ds = $Article->getDataSource();
> > +		$ds->cacheMethods = true;
> > +		$first = $ds->fields($Article);
> > +
> > +		$Article->schemaName = 'secondSchema';
> > +		$ds = $Article->getDataSource();
> > +		$ds->cacheMethods = true;
> > +		$second = $ds->fields($Article);
> > +
> > +		$this->assertEquals(2, count(DboSource::$methodCache['fields']));
>
> I am guessing the method cache for fields() isn't used in the PostgreSQL
> datasource.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cakephp/cakephp/pull/1683/files#r6625517>
> .
>