#1561: Result cache inactive for count() queries
-----------------------------------+----------------------------------------
 Reporter:  francois               |       Owner:  romanb 
     Type:  defect                 |      Status:  new    
 Priority:  minor                  |   Milestone:  Unknown
Component:  Caching                |     Version:  1.0.3  
 Keywords:                         |    Has_test:  0      
 Mystatus:  Pending Core Response  |   Has_patch:  0      
-----------------------------------+----------------------------------------
 If I terminate a query with `count()` instead of `execute()`, the result
 cache settings are ignored and the SQL query is always executed.

 Test script:
 {{{
 // execute once
 $query = Doctrine_Query::create()
   ->useResultCache(new Doctrine_Cache_Apc())
   ->select('b.title')
   ->from('Blog b')
   ->count();
 // execute a second time
 $query = Doctrine_Query::create()
   ->useResultCache(new Doctrine_Cache_Apc())
   ->select('b.title')
   ->from('Blog b')
   ->count();
 // this should not execute a new SQL query, yet it does
 }}}

 If `Doctrine_Query::count()` ignores cache settings n purpose, this should
 at leat be mentioned in the documentation.

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1561>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to