Revert "Disable the persistent cache (#6835)" (#7689)

This reverts commit 093b2fea8ac09fb1e9e0d712dbdecc0a09f2c1ad.

For https://github.com/flutter/flutter/issues/24058, We now only get a
"Program linking failed" error message on Windows Android simulators
without crahsing. Skia seems to have handled the linking failure in
https://skia-review.googlesource.com/c/skia/+/180372 by rebuilding the
program.
This commit is contained in:
liyuqian 2019-02-05 11:17:21 -08:00 committed by GitHub
parent 2c25936ecd
commit 2f87713d40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,8 +40,16 @@ PersistentCache* PersistentCache::GetCacheForProcess() {
return gPersistentCache.get();
}
PersistentCache::PersistentCache() {
// TODO(chinmaygarde): Reenable caching, avoiding the windows crasher.
PersistentCache::PersistentCache()
: cache_directory_(std::make_shared<fml::UniqueFD>(
CreateDirectory(fml::paths::GetCachesDirectory(),
{
"flutter_engine", //
blink::GetFlutterEngineVersion(), //
"skia", //
blink::GetSkiaVersion() //
},
fml::FilePermission::kReadWrite))) {
if (!IsValid()) {
FML_LOG(WARNING) << "Could not acquire the persistent cache directory. "
"Caching of GPU resources on disk is disabled.";