Skip to content

Commit 1f15307

Browse files
committed
Disable cache
1 parent 79fdbb3 commit 1f15307

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/file.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,18 @@ namespace Sass {
7676
}
7777

7878

79-
static thread_local std::unordered_map<
80-
sass::string, bool> cached;
79+
// static thread_local std::unordered_map<
80+
// sass::string, bool> cached;
8181

8282
// test if path exists and is a file
8383
// ToDo: Move the cache to context for thread safety
8484
bool file_exists(const sass::string& path, const sass::string& CWD)
8585
{
86-
auto it = cached.find(path);
87-
if (it != cached.end()) {
88-
// std::cerr << "cached reg " << path << "\n";
89-
return it->second;
90-
}
86+
// auto it = cached.find(path);
87+
// if (it != cached.end()) {
88+
// // std::cerr << "cached reg " << path << "\n";
89+
// return it->second;
90+
// }
9191
#ifdef _WIN32
9292
wchar_t resolved[32768];
9393
// windows unicode filepaths are encoded in utf16
@@ -110,13 +110,13 @@ namespace Sass {
110110
bool result = (dwAttrib != INVALID_FILE_ATTRIBUTES
111111
&& (!(dwAttrib & FILE_ATTRIBUTE_DIRECTORY)));
112112
// cached[abspath] = result;
113-
cached[path] = result;
113+
// cached[path] = result;
114114
return result;
115115
#else
116116
struct stat st_buf;
117117
bool result = (stat (path.c_str(), &st_buf) == 0)
118118
&& (!S_ISDIR (st_buf.st_mode));
119-
cached[path] = result;
119+
// cached[path] = result;
120120
return result;
121121
#endif
122122
}

0 commit comments

Comments
 (0)