https://github.com/kadircet requested changes to this pull request.
instead of introducing a new concept of `ProjectModulesCache` and requiring each `ProjectModules` implementation to know about it and work with it; what about introducing a: ```cpp class CachingProjectModules : public ProjectModules { public: CachingProjectModules(GlobalCompilationDatabase &CDB); // Implements rest of the operations with a cache overlay. ...; // Whenever cache is invalid/empty, queries `CDB` for underlying `ProjectModules` // and updates/builds a cache using it. }; ``` into `ModulesBuilder.cpp` and have an instance of this in `ModulesBuilderImpl`? That way we can centralize how the caching will work and won't need to maintain multiple implementations that play with it. As for cache validation, i think it's fine to invalidate based on file contents and whenever there's a mismatch we can query `CDB` again. WDYT? https://github.com/llvm/llvm-project/pull/125988 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits