commit 5900dfb26282790d6089d98d35306a5e654232f6
Author: Bertrand Dunogier <bd@ez.no>
Date:   Mon Jul 22 17:59:47 2013 +0200

    Fix EZP-21046: View cache is not expiring in one node
    
    (cherry picked from commit 512174ae30e15b13944b9f9e9f20b8ceb9646b2d)
    (cherry picked from commit a540abc5a2b06fcd004cd4a9a287393139050444)
    (cherry picked from commit 02e8793320c9d338222b3512408c87e25d089f67)
    
    Conflicts:
    	kernel/private/classes/clusterfilehandlers/dfsbackends/dfs.php

diff --git a/kernel/private/classes/clusterfilehandlers/dfsbackends/dfs.php b/kernel/private/classes/clusterfilehandlers/dfsbackends/dfs.php
index b4147a0..ab182ce 100644
--- a/kernel/private/classes/clusterfilehandlers/dfsbackends/dfs.php
+++ b/kernel/private/classes/clusterfilehandlers/dfsbackends/dfs.php
@@ -95,6 +95,11 @@ class eZDFSFileHandlerDFSBackend
         else
             $ret = eZFile::create( basename( $dstFilePath ), dirname( $dstFilePath ), file_get_contents( $srcFilePath ) );
 
+        if ( $ret )
+        {
+            $ret = $this->copyTimestamp( $srcFilePath, $dstFilePath );
+        }
+
         $this->accumulatorStop();
 
         return $ret;
@@ -265,6 +270,24 @@ class eZDFSFileHandlerDFSBackend
     }
 
     /**
+     * copies the timestamp from the original file to the destination file
+     * @param string $srcFilePath
+     * @param string $dstFilePath
+     * @return bool False if the timestamp is not set with success on target file
+     */
+    protected function copyTimestamp( $srcFilePath, $dstFilePath )
+    {
+        clearstatcache( true, $srcFilePath );
+        $originalTimestamp = filemtime( $srcFilePath );
+        if ( !$originalTimestamp )
+        {
+            return false;
+        }
+
+        return touch( $dstFilePath, $originalTimestamp);
+    }
+
+    /**
      * Path to the local distributed filesystem mount point
      * @var string
      */
