From 856b01b6dafe2fdba4db4bc4fdc1d8c2def71891 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Tue, 10 Aug 2010 14:26:34 +0000 Subject: [PATCH] Comments on the caching mechanism. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35113 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Buffer.h b/src/Buffer.h index d1a591af06..add05579cc 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -342,8 +342,20 @@ public: */ void validate(LaTeXFeatures &) const; - /// Information from BibTeX databases is cached in the Buffer, so - /// we do not have to read the file over and over. + /// Reference information is cached in the Buffer, so we do not + /// have to check or read things over and over. + /// + /// There are two caches. + /// + /// One is a cache of the BibTeX files from which reference info is + /// being gathered. This cache is PER BUFFER, and the cache for the + /// master essentially includes the cache for its children. This gets + /// invalidated when an InsetBibtex is created, deleted, or modified. + /// + /// The other is a cache of the reference information itself. This + /// exists only in the master buffer, and when it needs to be updated, + /// the children add their information to the master's cache. + /// Calling this method invalidates the cache and so requires a /// re-read. void invalidateBibinfoCache() const; -- 2.39.2