Module INTERNAL.Project_cache

module TYPES : sig ... end
include module type of TYPES with type storage = TYPES.storage and type config = TYPES.config
type storage = TYPES.storage =
  1. | No_storage
  2. | Store_in_file of {
    1. relative_filename : string;
    }
  3. | Store_in_shared_dir of {
    1. dirname : string;
    }
type config = TYPES.config = {
  1. cache_storage : storage;
  2. cache_verbose : bool;
}
val save : config:TYPES.config -> Cobol_lsp__.Lsp_document.TYPES.document Stdlib__Map.Make(Lsp.Uri).t -> unit

save ~config docs saves the caches of all the given document's projects.

For any project p of which at least one document belongs to docs, any document of p that does not belong to docs is removed from p's cache.

Some notifications about the saving process may be pushed via Lsp_io.send_notification. May raise some IO-related exceptions (Sys_error, Failure).

val load : rootdir:Superbol_project__.Project.TYPES.rootdir -> layout:Superbol_project__.Project.TYPES.layout -> config:TYPES.config -> Cobol_lsp__.Lsp_document.TYPES.document Stdlib__Map.Make(Lsp.Uri).t

load ~rootdir ~config ~layout pre-loads cached documents pertaining to a project located in rootdir, with project directory layout layout.

All projects in the returned map belong to the same project. Note this map may actually be empty (for instance in case of missing, out-dated cache files, or cache files for a different version of the library).

Some notifications about the loading process may be pushed via Lsp_io.send_notification. May raise some IO-related exceptions (Sys_error, Failure).