Ticket #1561 (new defect)
Result cache inactive for count() queries
| Reported by: | francois | Owned by: | romanb |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.2.0 |
| Component: | Caching | Version: | 1.0.3 |
| Severity: | abc | Keywords: | |
| Cc: | Has Test: | yes | |
| Status: | Pending Core Response | Has Patch: | no |
Description (last modified by esycat) (diff)
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
