#1 Apply local time to cache files to work-around FS time skew

open
nobody
None
5
2004-11-20
2004-11-20
Poulpy
No

Hi,

at first, thanks for your efforts for making this software.

I had a problem with the times being different on the
server that executes my PHP code and the server on
which the files are physically located (mounted by NFS).

To work-around it, I've patched Magpie by just adding a
"touch" to the cache file after it has been updated:

$ diff -c rss_cache.inc.orig rss_cache.inc
*** rss_cache.inc.orig Sat Nov 20 15:09:58 2004
--- rss_cache.inc Sat Nov 20 15:14:05 2004
***************
*** 63,69 ****

$data = $this->serialize( $rss );
fwrite( $fp, $data );
! fclose( $fp );

return $cache_file;
}
--- 63,72 ----

$data = $this->serialize( $rss );
fwrite( $fp, $data );
! fclose( $fp );
!
! // Apply local time to cache files to
work-around FS time skew
! touch( $cache_file );

return $cache_file;
}

If you find the time to integrate this patch into
Magpie, it would be nice.

Best regards,
Patrick.

Discussion