mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp
changeset 51 e61a04404bdf
parent 32 edd273b3192a
child 54 fa0adf088850
--- a/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp	Tue Jul 06 14:48:59 2010 +0300
+++ b/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp	Wed Aug 18 10:16:02 2010 +0300
@@ -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