From 1585432eb10392db478b79b9e8f19a4f634fd174 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 8 Sep 2018 10:57:11 -0700 Subject: [PATCH] empty cacheDirectory --- Initialization-options.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Initialization-options.md b/Initialization-options.md index 51ac618..1fbf128 100644 --- a/Initialization-options.md +++ b/Initialization-options.md @@ -8,6 +8,8 @@ Each language client has its own way to specify initialization options. ccls sup It points to a directory (relative or absolute) storing indexing files so that next time ccls can load these indexing results without full indexing. +If empty, cache will be stored in memory. + ## `clang.extraArgs` `clang.excludeArgs` Additional arguments or excluded arguments for `compile_commands.json` entries. @@ -56,7 +58,15 @@ You usually want to use `index.multiVersionBlacklist` to exclude system headers. It is `false` by default which means to re-index when a document is saved. Set it to `true` to re-index for every change to a document. -The performance will suffer a lot. +The performance may suffer a lot. + +This is best used in conjunction with empty empty `cacheDirectory` to avoid writing cache files: +```javascript +{ + "cacheDirectory": "", + "index": {"onChange": true} +} +``` ## `cacheFormat`: serialization format of cache files