Merge pull request #1468 from atetubou/fscache_checkout_flush

checkout.c: enable fscache for checkout again

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2018-10-12 23:03:48 +02:00
6 changed files with 60 additions and 0 deletions

View File

@@ -409,6 +409,18 @@ int fscache_enable(int enable)
return result;
}
/*
* Flush cached stats result when fscache is enabled.
*/
void fscache_flush(void)
{
if (enabled) {
EnterCriticalSection(&mutex);
fscache_clear();
LeaveCriticalSection(&mutex);
}
}
/*
* Lstat replacement, uses the cache if enabled, otherwise redirects to
* mingw_lstat.

View File

@@ -7,6 +7,9 @@ int fscache_enable(int enable);
int fscache_enabled(const char *path);
#define is_fscache_enabled(path) fscache_enabled(path)
void fscache_flush(void);
#define flush_fscache() fscache_flush()
DIR *fscache_opendir(const char *dir);
int fscache_lstat(const char *file_name, struct stat *buf);