webengine/osswebengine/cache/src/HttpCacheStreamHandler.cpp
changeset 17 c8a366e56285
parent 16 a359256acfc6
child 68 92a765b5b3e7
child 71 4bd5176e1bc8
--- a/webengine/osswebengine/cache/src/HttpCacheStreamHandler.cpp	Thu Aug 27 07:44:59 2009 +0300
+++ b/webengine/osswebengine/cache/src/HttpCacheStreamHandler.cpp	Thu Sep 24 12:53:48 2009 +0300
@@ -494,7 +494,7 @@
 
     if ( datalen && aEntry.BodyData().Length() ) // don't bother writing files which have no body data
         {
-        if ( IsDiskSpaceAvailable( datalen ) && CreateNewBodyFile( aEntry ) )
+        if ( IsDiskSpaceAvailable( datalen ) && CreateNewBodyFile( aEntry, ETrue ) )
             {
 #ifdef __CACHELOG__
             HttpCacheUtil::WriteFormatLog(0, _L("CACHEPOSTPONE:   Triggering Async write for object 0x%08x."), &aEntry);
@@ -594,12 +594,16 @@
 //
 // -----------------------------------------------------------------------------
 //
-TBool CHttpCacheStreamHandler::CreateNewBodyFile( CHttpCacheEntry& aCacheEntry )
+TBool CHttpCacheStreamHandler::CreateNewBodyFile( CHttpCacheEntry& aCacheEntry, TBool aUseDirectIO )
     {
     TInt statusBody( KErrNotFound );
 
     // Create the body file or replace it, if it exists.
+#ifdef BRDO_RFILE_WRITE_DIRECT_IO_FF
+    statusBody = aCacheEntry.BodyFile().Replace( iRfs, aCacheEntry.Filename(), EFileShareExclusive | EFileWrite | (aUseDirectIO ? EFileWriteDirectIO : 0) );
+#else
     statusBody = aCacheEntry.BodyFile().Replace( iRfs, aCacheEntry.Filename(), EFileShareExclusive | EFileWrite );
+#endif
 
 #ifdef __CACHELOG__
     HttpCacheUtil::WriteUrlToLog( 0, aCacheEntry.Filename(), aCacheEntry.Url() );