mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp
changeset 50 762d760dcfdf
parent 32 edd273b3192a
child 54 fa0adf088850
--- a/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp	Fri Jul 23 17:48:16 2010 -0500
+++ b/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp	Fri Aug 06 17:13:32 2010 -0500
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  Extended collection helper with an internal caching array
-*  Version     : %version: da1mmcf#27.1.12.3.2 % 
+*  Version     : %version: e003sa33#27.1.12.3.4 % 
 *
 */
 
@@ -395,6 +395,11 @@
     // Not found in the array
     if( !media )
         {
+        // If the catched count is more than KCacheCount, commit it to database.
+        if( count >= KCacheCount )
+            {
+            Commit();
+            }
         CMPXMedia* copy = CMPXMedia::NewL( *aMedia );
         CleanupStack::PushL( copy );
         iCache->AppendL( copy );  // ownership x-fer