Skip to main content

Module semantic_cache

Module semantic_cache 

Source
Expand description

Per-project similarity index over the files a session read.

An entry is derived from ONE file: its path and the term frequencies of its text. It is a derived store like any index (G04, E3):

  • at the write the text passes storage admission (StoreAdmission); text that is withheld or restricted leaves no entry, and the index records the digest of the policy its entries were admitted under;
  • at the use (SemanticCacheIndex::find_similar) an index its store loaded names a file only while the admitted rooted reader returns that file NOW and its text still has the terms the entry was built from. A file that is gone, outside the project, withheld, restricted or changed is not named; its entry is refreshed when the file is read again.

The reads of one find_similar call are bounded and not remembered beyond it.

Structsยง

SemanticCacheEntry
SemanticCacheIndex