tag:blogger.com,1999:blog-5246987755651065286.post6901587662362460070..comments2024-02-22T16:15:42.388-08:00Comments on cbloom rants: 05-26-10 - Windows Page Cachecbloomhttp://www.blogger.com/profile/10714564834899413045noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5246987755651065286.post-10273648623882458472010-05-28T08:43:24.937-07:002010-05-28T08:43:24.937-07:00Something that wasn't clear, when you make the...Something that wasn't clear, when you make the temporary file, just use GetTemporaryFilename. When you "commit" it, make a useful name, like goatse.jpg.tmp.won3dhttps://www.blogger.com/profile/09787472194187459747noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-60385721198487121502010-05-28T08:42:15.022-07:002010-05-28T08:42:15.022-07:00I think using FILE_ATTRIBUTE_TEMPORARY has the &qu...I think using FILE_ATTRIBUTE_TEMPORARY has the "avoid filesystem at all costs" behavior, but obviously lacks the cross-invocation persistence. I think what you could do is have an overlay system. Say I want the uncompressed goatse.jpg:<br /><br />1) If goatse.jpg.tmp exists, use it.<br /><br />2) Otherwise, make a temporary file, and decompresss goatse.jpg into it.<br /><br />3) All new temporary files are queued as a really low-priority entity on a shared disk thread. When the disk IO thread is idle, it does MoveFileEx to commit the temporary data to the filesystem. Make sure you flush this queue on program shutdown.won3dhttps://www.blogger.com/profile/09787472194187459747noreply@blogger.com