lib/inward.js
function inward_act_cache(ctxt, data) {
  var so = ctxt.options
  var meta = data.meta

  var actid = meta.id
  var private$ = ctxt.seneca.private$

  if (actid != null && so.history.active) {
    var actdetails = private$.history.get(actid)

    if (actdetails) {
      private$.stats.act.cache++

      var latest = actdetails.result[actdetails.result.length - 1] || {}

      var out = {
        kind: latest.err ? 'error' : 'result',
        result: latest.res || null,
        error: latest.err || null,
        log: {
          level: 'debug',
          data: {
            kind: 'act',
            case: 'CACHE',
            cachetime: latest.when
          }
        }
      }

      ctxt.cached$ = true

      return out
    }
  }
}
function inward_act_cache(ctxt, data) {
  var so = ctxt.options
  var meta = data.meta

  var actid = meta.id
  var private$ = ctxt.seneca.private$

  if (actid != null && so.history.active) {
    var actdetails = private$.history.get(actid)

    if (actdetails) {
      private$.stats.act.cache++

      var latest = actdetails.result[actdetails.result.length - 1] || {}

      var out = {
        kind: latest.err ? 'error' : 'result',
        result: latest.res || null,
        error: latest.err || null,
        log: {
          level: 'debug',
          data: {
            kind: 'act',
            case: 'CACHE',
            cachetime: latest.when
          }
        }
      }

      ctxt.cached$ = true

      return out
    }
  }
}
function inward_act_cache ( ctxt , data ) { var so = ctxt . options var meta = data . meta var actid = meta . id var private$ = ctxt . seneca . private$ if ( actid != null && so . history . active ) { var actdetails = private$ . history . get ( actid ) if ( actdetails ) { private$ . stats . act . cache ++ var latest = actdetails . result [ actdetails . result . length - 1 ] || { } var out = { kind : latest . err ? 'error' : 'result' , result : latest . res || null , error : latest . err || null , log : { level : 'debug' , data : { kind : 'act' , case : 'CACHE' , cachetime : latest . when } } } ctxt . cached$ = true return out } } }
Check if actid has already been seen, and if action cache is active, then provide cached result, if any. Return true in this case.
Check if actid has already been seen and if action cache is active then provide cached result if any . Return true in this case .