cache.js
/*      outcome/
 * Based on our caching strategy
 * (see `cachedUpto`) we check if
 * there are new records in the log
 * and if the last record we
 * processed is different. If so, we
 * re-process the entire log
 * otherwise we only reprocess the
 * new, appended, records.
 */
outcome
Based on our caching strategy
we check if
there are new records in the log
and if the last record we
processed is different. If so, we
re-process the entire log
otherwise we only reprocess the
new, appended, records.
outcome Based on our caching strategy we check if there are new records in the log and if the last record we processed is different . If so we re - process the entire log otherwise we only reprocess the new appended records .
function afterCached(cache, logname, recs) {
    let cr = cache[logname]
    if(!cr) return recs
    if(recs.length == cr.recndx+1) return null
    let rec = recs[cr.recndx]
    if(isEq(rec, cr.rec)) return recs.slice(cr.recndx+1)
    else return recs
}
function afterCached ( cache , logname , recs ) { let cr = cache [ logname ] if ( ! cr ) return recs if ( recs . length == cr . recndx + 1 ) return null let rec = recs [ cr . recndx ] if ( isEq ( rec , cr . rec ) ) return recs . slice ( cr . recndx + 1 ) else return recs }
outcome
 Based on our caching strategy
 (see `cachedUpto`) we check if
 there are new records in the log
 and if the last record we
 processed is different.
outcome Based on our caching strategy ( see ` cachedUpto ` ) we check if there are new records in the log and if the last record we processed is different .