mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp
branchRCL_3
changeset 23 e42293e811d8
parent 17 6f9f6e99a23e
child 24 6c1dfe4da5dd
--- a/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp	Thu Jul 15 19:11:42 2010 +0300
+++ b/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp	Thu Aug 19 10:24:28 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  Extended collection helper with an internal caching array
-*  Version     : %version: da1mmcf#27.1.12.1.2 % 
+*  Version     : %version: e003sa33#27.1.12.1.3 % 
 *
 */
 
@@ -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