ce" title="Tue, 29 May 2018 13:12:10 CST">8 lat temu css-focus-within.json 11e3a9652a first 8 lat temu css-font-rendering-controls.json 11e3a9652a first 8 lat temu css-font-stretch.json 11e3a9652a first 8 lat temu css-gencontent.json 11e3a9652a first 8 lat temu css-gradients.json 11e3a9652a first 8 lat temu css-grid.json 11e3a9652a first 8 lat temu css-hanging-punctuation.json 11e3a9652a first 8 lat temu css-has.json 11e3a9652a first 8 lat temu css-hyphenate.json 11e3a9652a first 8 lat temu css-hyphens.json 11e3a9652a first 8 lat temu css-image-orientation.json 11e3a9652a first 8 lat temu css-image-set.json 11e3a9652a first 8 lat temu css-in-out-of-range.json 11e3a9652a first 8 lat temu css-indeterminate-pseudo.json 11e3a9652a first 8 lat temu css-initial-letter.json 11e3a9652a first 8 lat temu css-initial-value.json 11e3a9652a first 8 lat temu css-letter-spacing.json 11e3a9652a first 8 lat temu css-line-clamp.json 11e3a9652a first 8 lat temu css-logical-props.json 11e3a9652a first 8 lat temu css-marker-pseudo.json 11e3a9652a first 8 lat temu css-masks.json 11e3a9652a first 8 lat temu css-matches-pseudo.json 11e3a9652a first 8 lat temu css-media-interaction.json 11e3a9652a first 8 lat temu css-media-resolution.json 11e3a9652a first 8 lat temu css-media-scripting.json 11e3a9652a first 8 lat temu css-mediaqueries.json 11e3a9652a first 8 lat temu css-mixblendmode.json 11e3a9652a first 8 lat temu css-motion-paths.json 11e3a9652a first 8 lat temu css-namespaces.json 11e3a9652a first 8 lat temu css-not-sel-list.json 11e3a9652a first 8 lat temu css-nth-child-of.json 11e3a9652a first 8 lat temu css-opacity.json 11e3a9652a first 8 lat temu css-optional-pseudo.json 11e3a9652a first 8 lat temu css-overflow-anchor.json 11e3a9652a first 8 lat temu css-overscroll-behavior.json 11e3a9652a first 8 lat temu css-page-break.json 11e3a9652a first 8 lat temu css-paged-media.json 11e3a9652a first 8 lat temu css-paint-api.json 11e3a9652a first 8 lat temu css-placeholder-shown.json 11e3a9652a first 8 lat temu css-placeholder.json 11e3a9652a first 8 lat temu css-read-only-write.json 11e3a9652a first 8 lat temu css-rebeccapurple.json 11e3a9652a first 8 lat temu css-reflections.json 11e3a9652a first 8 lat temu css-regions.json 11e3a9652a first 8 lat temu css-repeating-gradients.json 11e3a9652a first 8 lat temu css-resize.json 11e3a9652a first 8 lat temu css-revert-value.json 11e3a9652a first 8 lat temu css-rrggbbaa.json 11e3a9652a first 8 lat temu css-scroll-behavior.json 11e3a9652a first 8 lat temu css-scrollbar.json 11e3a9652a first 8 lat temu css-sel2.json 11e3a9652a first 8 lat temu css-sel3.json 11e3a9652a first 8 lat temu css-selection.json 11e3a9652a first 8 lat temu css-shapes.json 11e3a9652a first 8 lat temu css-snappoints.json 11e3a9652a first 8 lat temu css-sticky.json 11e3a9652a first 8 lat temu css-supports-api.json 11e3a9652a first 8 lat temu css-table.json 11e3a9652a first 8 lat temu css-text-align-last.json 11e3a9652a first 8 lat temu css-text-indent.json 11e3a9652a first 8 lat temu css-text-justify.json 11e3a9652a first 8 lat temu css-text-orientation.json 11e3a9652a first 8 lat temu css-text-spacing.json 11e3a9652a first 8 lat temu css-textshadow.json 11e3a9652a first 8 lat temu css-touch-action-2.json 11e3a9652a first 8 lat temu css-touch-action.json 11e3a9652a first 8 lat temu css-transitions.json 11e3a9652a first 8 lat temu css-unicode-bidi.json 11e3a9652a first 8 lat temu css-unset-value.json 11e3a9652a first 8 lat temu css-variables.json 11e3a9652a first 8 lat temu css-widows-orphans.json 11e3a9652a first 8 lat temu css-writing-mode.json 11e3a9652a first 8 lat temu css-zoom.json 11e3a9652a first 8 lat temu css3-attr.json 11e3a9652a first 8 lat temu css3-boxsizing.json 11e3a9652a first 8 lat temu css3-colors.json 11e3a9652a first 8 lat temu css3-cursors-grab.json 11e3a9652a first 8 lat temu css3-cursors-newer.json 11e3a9652a first 8 lat temu css3-cursors.json 11e3a9652a first 8 lat temu css3-tabsize.json 11e3a9652a first 8 lat temu currentcolor.json 11e3a9652a first 8 lat temu custom-elements.json 11e3a9652a first 8 lat temu custom-elementsv1.json 11e3a9652a first 8 lat temu customevent.json 11e3a9652a first 8 lat temu datalist.json 11e3a9652a first 8 lat temu dataset.json 11e3a9652a first 8 lat temu datauri.json 11e3a9652a first 8 lat temu details.json 11e3a9652a first 8 lat temu deviceorientation.json 11e3a9652a first 8 lat temu devicepixelratio.json 11e3a9652a first 8 lat temu dialog.json 11e3a9652a first 8 lat temu dispatchevent.json 11e3a9652a first 8 lat temu do-not-track.json 11e3a9652a first 8 lat temu document-currentscript.json 11e3a9652a first 8 lat temu document-evaluate-xpath.json 11e3a9652a first 8 lat temu document-execcommand.json 11e3a9652a first 8 lat temu document-scrollingelement.json 11e3a9652a first 8 lat temu documenthead.json 11e3a9652a first 8 lat temu dom-manip-convenience.json 11e3a9652a first 8 lat temu dom-range.json 11e3a9652a first 8 lat temu domcontentloaded.json 11e3a9652a first 8 lat temu domfocusin-domfocusout-events.json 11e3a9652a first 8 lat temu dommatrix.json 11e3a9652a first 8 lat temu download.json 11e3a9652a first 8 lat temu dragndrop.json 11e3a9652a first 8 lat temu element-closest.json 11e3a9652a first 8 lat temu element-from-point.json 11e3a9652a first 8 lat temu eme.json 11e3a9652a first 8 lat temu eot.json 11e3a9652a first 8 lat temu es5.json 11e3a9652a first 8 lat temu es6-class.json 11e3a9652a first 8 lat temu es6-generators.json 11e3a9652a first 8 lat temu es6-module-dynamic-import.json 11e3a9652a first 8 lat temu es6-module.json 11e3a9652a first 8 lat temu es6-number.json 11e3a9652a first 8 lat temu es6-string-includes.json 11e3a9652a first 8 lat temu eventsource.json 11e3a9652a first 8 lat temu fetch.json 11e3a9652a first 8 lat temu fieldset-disabled.json 11e3a9652a first 8 lat temu fileapi.json 11e3a9652a first 8 lat temu filereader.json 11e3a9652a first 8 lat temu filereadersync.json 11e3a9652a first 8 lat temu filesystem.json 11e3a9652a first 8 lat temu flac.json 11e3a9652a first 8 lat temu flexbox.json 11e3a9652a first 8 lat temu flow-root.json 11e3a9652a first 8 lat temu focusin-focusout-events.json 11e3a9652a first 8 lat temu focusoptions-preventscroll.json 11e3a9652a first 8 lat temu font-family-system-ui.json 11e3a9652a first 8 lat temu font-feature.json 11e3a9652a first 8 lat temu font-kerning.json 11e3a9652a first 8 lat temu font-loading.json 11e3a9652a first 8 lat temu font-size-adjust.json 11e3a9652a first 8 lat temu font-smooth.json 11e3a9652a first 8 lat temu font-unicode-range.json 11e3a9652a first 8 lat temu font-variant-alternates.json 11e3a9652a first 8 lat temu font-variant-east-asian.json 11e3a9652a first 8 lat temu fontface.json 11e3a9652a first 8 lat temu form-attribute.json 11e3a9652a first 8 lat temu form-submit-attributes.json 11e3a9652a first 8 lat temu form-validation.json 11e3a9652a first 8 lat temu forms.json 11e3a9652a first 8 lat temu fullscreen.json 11e3a9652a first 8 lat temu gamepad.json 11e3a9652a first 8 lat temu geolocation.json 11e3a9652a first 8 lat temu getboundingclientrect.json 11e3a9652a first 8 lat temu getcomputedstyle.json 11e3a9652a first 8 lat temu getelementsbyclassname.json 11e3a9652a first 8 lat temu getrandomvalues.json 11e3a9652a first 8 lat temu hardwareconcurrency.json 11e3a9652a first 8 lat temu hashchange.json 11e3a9652a first 8 lat temu heif.json 11e3a9652a first 8 lat temu hevc.json 11e3a9652a first 8 lat temu hidden.json 11e3a9652a first 8 lat temu high-resolution-time.json 11e3a9652a first 8 lat temu history.json 11e3a9652a first 8 lat temu html-media-capture.json 11e3a9652a first 8 lat temu html5semantic.json 11e3a9652a first 8 lat temu http-live-streaming.json 11e3a9652a first 8 lat temu http2.json 11e3a9652a first 8 lat temu iframe-sandbox.json 11e3a9652a first 8 lat temu iframe-seamless.json 11e3a9652a first 8 lat temu iframe-srcdoc.json 11e3a9652a first 8 lat temu imagecapture.json 11e3a9652a first 8 lat temu ime.json 11e3a9652a first 8 lat temu img-naturalwidth-naturalheight.json 11e3a9652a first 8 lat temu imports.json 11e3a9652a first 8 lat temu indeterminate-checkbox.json 11e3a9652a first 8 lat temu indexeddb.json 11e3a9652a first 8 lat temu indexeddb2.json 11e3a9652a first 8 lat temu inline-block.json 11e3a9652a first 8 lat temu innertext.json 11e3a9652a first 8 lat temu input-autocomplete-onoff.json 11e3a9652a first 8 lat temu input-color.json 11e3a9652a first 8 lat temu input-datetime.json 11e3a9652a first 8 lat temu input-email-tel-url.json 11e3a9652a first 8 lat temu input-event.json 11e3a9652a first 8 lat temu input-file-accept.json 11e3a9652a first 8 lat temu input-file-directory.json 11e3a9652a first 8 lat temu input-file-multiple.json 11e3a9652a first 8 lat temu input-inputmode.json 11e3a9652a first 8 lat temu input-minlength.json 11e3a9652a first 8 lat temu input-number.json 11e3a9652a first 8 lat temu input-pattern.json 11e3a9652a first 8 lat temu input-placeholder.json 11e3a9652a first 8 lat temu input-range.json 11e3a9652a first 8 lat temu input-search.json 11e3a9652a first 8 lat temu input-selection.json 11e3a9652a first 8 lat temu insert-adjacent.json 11e3a9652a first 8 lat temu insertadjacenthtml.json 11e3a9652a first 8 lat temu internationalization.json 11e3a9652a first 8 lat temu intersectionobserver.json 11e3a9652a first 8 lat temu intrinsic-width.json 11e3a9652a first 8 lat temu jpeg2000.json 11e3a9652a first 8 lat temu jpegxr.json 11e3a9652a first 8 lat temu json.json 11e3a9652a first 8 lat temu kerning-pairs-ligatures.json 11e3a9652a first 8 lat temu keyboardevent-charcode.json 11e3a9652a first 8 lat temu keyboardevent-code.json 11e3a9652a first 8 lat temu keyboardevent-getmodifierstate.json 11e3a9652a first 8 lat temu keyboardevent-key.json 11e3a9652a first 8 lat temu keyboardevent-location.json 11e3a9652a first 8 lat temu keyboardevent-which.json 11e3a9652a first 8 lat temu lazyload.json 11e3a9652a first 8 lat temu let.json 11e3a9652a first 8 lat temu link-icon-png.json 11e3a9652a first 8 lat temu link-icon-svg.json 11e3a9652a first 8 lat temu link-rel-dns-prefetch.json 11e3a9652a first 8 lat temu link-rel-preconnect.json 11e3a9652a first 8 lat temu link-rel-prefetch.json 11e3a9652a first 8 lat temu link-rel-preload.json 11e3a9652a first 8 lat temu link-rel-prerender.json 11e3a9652a first 8 lat temu localecompare.json 11e3a9652a first 8 lat temu matchesselector.json 11e3a9652a first 8 lat temu matchmedia.json 11e3a9652a first 8 lat temu mathml.json 11e3a9652a first 8 lat temu maxlength.json 11e3a9652a first 8 lat temu media-attribute.json 11e3a9652a first 8 lat temu media-fragments.json 11e3a9652a first 8 lat temu media-session-api.json 11e3a9652a first 8 lat temu mediacapture-fromelement.json 11e3a9652a first 8 lat temu mediarecorder.json 11e3a9652a first 8 lat temu mediasource.json 11e3a9652a first 8 lat temu menu.json 11e3a9652a first 8 lat temu meter.json 11e3a9652a first 8 lat temu midi.json 11e3a9652a first 8 lat temu minmaxwh.json 11e3a9652a first 8 lat temu mp3.json 11e3a9652a first 8 lat temu mpeg-dash.json 11e3a9652a first 8 lat temu mpeg4.json 11e3a9652a first 8 lat temu multibackgrounds.json 11e3a9652a first 8 lat temu multicolumn.json 11e3a9652a first 8 lat temu mutation-events.json 11e3a9652a first 8 lat temu mutationobserver.json 11e3a9652a first 8 lat temu namevalue-storage.json 11e3a9652a first 8 lat temu nav-timing.json 11e3a9652a first 8 lat temu navigator-language.json 11e3a9652a first 8 lat temu netinfo.json 11e3a9652a first 8 lat temu node-contains.json 11e3a9652a first 8 lat temu node-parentelement.json 11e3a9652a first 8 lat temu notifications.json 11e3a9652a first 8 lat temu object-fit.json 11e3a9652a first 8 lat temu object-observe.json 11e3a9652a first 8 lat temu object-values.json 11e3a9652a first 8 lat temu objectrtc.json 11e3a9652a first 8 lat temu offline-apps.json 11e3a9652a first 8 lat temu offscreencanvas.json 11e3a9652a first 8 lat temu ogg-vorbis.json 11e3a9652a first 8 lat temu ogv.json 11e3a9652a first 8 lat temu ol-reversed.json 11e3a9652a first 8 lat temu once-event-listener.json 11e3a9652a first 8 lat temu online-status.json 11e3a9652a first 8 lat temu opus.json 11e3a9652a first 8 lat temu outline.json 11e3a9652a first 8 lat temu pad-start-end.json 11e3a9652a first 8 lat temu page-transition-events.json 11e3a9652a first 8 lat temu pagevisibility.json 11e3a9652a first 8 lat temu passive-event-listener.json 11e3a9652a first 8 lat temu path2d.json 11e3a9652a first 8 lat temu payment-request.json 11e3a9652a first 8 lat temu permissions-api.json 11e3a9652a first 8 lat temu picture.json 11e3a9652a first 8 lat temu ping.json 11e3a9652a first 8 lat temu png-alpha.json 11e3a9652a first 8 lat temu pointer-events.json 11e3a9652a first 8 lat temu pointer.json 11e3a9652a first 8 lat temu pointerlock.json 11e3a9652a first 8 lat temu prefers-reduced-motion.json 11e3a9652a first 8 lat temu progress.json 11e3a9652a first 8 lat temu promises.json 11e3a9652a first 8 lat temu proximity.json 11e3a9652a first 8 lat temu proxy.json 11e3a9652a first 8 lat temu publickeypinning.json 11e3a9652a first 8 lat temu push-api.json 11e3a9652a first 8 lat temu queryselector.json 11e3a9652a first 8 lat temu readonly-attr.json 11e3a9652a first 8 lat temu referrer-policy.json 11e3a9652a first 8 lat temu registerprotocolhandler.json 11e3a9652a first 8 lat temu rel-noopener.json 11e3a9652a first 8 lat temu rel-noreferrer.json 11e3a9652a first 8 lat temu rellist.json 11e3a9652a first 8 lat temu rem.json 11e3a9652a first 8 lat temu requestanimationframe.json 11e3a9652a first 8 lat temu requestidlecallback.json 11e3a9652a first 8 lat temu resizeobserver.json 11e3a9652a first 8 lat temu resource-timing.json 11e3a9652a first 8 lat temu rest-parameters.json 11e3a9652a first 8 lat temu rtcpeerconnection.json 11e3a9652a first 8 lat temu ruby.json 11e3a9652a first 8 lat temu run-in.json 11e3a9652a first 8 lat temu same-site-cookie-attribute.json 11e3a9652a first 8 lat temu screen-orientation.json 11e3a9652a first 8 lat temu script-async.json 11e3a9652a first 8 lat temu script-defer.json 11e3a9652a first 8 lat temu scrollintoview.json 11e3a9652a first 8 lat temu scrollintoviewifneeded.json 11e3a9652a first 8 lat temu sdch.json 11e3a9652a first 8 lat temu selection-api.json 11e3a9652a first 8 lat temu server-timing.json 11e3a9652a first 8 lat temu serviceworkers.json 11e3a9652a first 8 lat temu setimmediate.json 11e3a9652a first 8 lat temu sha-2.json 11e3a9652a first 8 lat temu shadowdom.json 11e3a9652a first 8 lat temu shadowdomv1.json 11e3a9652a first 8 lat temu sharedworkers.json 11e3a9652a first 8 lat temu sni.json 11e3a9652a first 8 lat temu spdy.json 11e3a9652a first 8 lat temu speech-recognition.json 11e3a9652a first 8 lat temu speech-synthesis.json 11e3a9652a first 8 lat temu spellcheck-attribute.json 11e3a9652a first 8 lat temu sql-storage.json 11e3a9652a first 8 lat temu srcset.json 11e3a9652a first 8 lat temu stopimmediatepropagation.json 11e3a9652a first 8 lat temu stream.json 11e3a9652a first 8 lat temu streams.json 11e3a9652a first 8 lat temu stricttransportsecurity.json 11e3a9652a first 8 lat temu style-scoped.json 11e3a9652a first 8 lat temu subresource-integrity.json 11e3a9652a first 8 lat temu svg-css.json 11e3a9652a first 8 lat temu svg-filters.json 11e3a9652a first 8 lat temu svg-fonts.json 11e3a9652a first 8 lat temu svg-fragment.json 11e3a9652a first 8 lat temu svg-html.json 11e3a9652a first 8 lat temu svg-html5.json 11e3a9652a first 8 lat temu svg-img.json 11e3a9652a first 8 lat temu svg-smil.json 11e3a9652a first 8 lat temu svg.json 11e3a9652a first 8 lat temu symbols.json 11e3a9652a first 8 lat temu tabindex-attr.json 11e3a9652a first 8 lat temu template-literals.json 11e3a9652a first 8 lat temu template.json 11e3a9652a first 8 lat temu testfeat.json 11e3a9652a first 8 lat temu text-decoration.json 11e3a9652a first 8 lat temu text-emphasis.json 11e3a9652a first 8 lat temu text-overflow.json 11e3a9652a first 8 lat temu text-size-adjust.json 11e3a9652a first 8 lat temu text-stroke.json 11e3a9652a first 8 lat temu textcontent.json 11e3a9652a first 8 lat temu textencoder.json 11e3a9652a first 8 lat temu tls1-1.json 11e3a9652a first 8 lat temu tls1-2.json 11e3a9652a first 8 lat temu tls1-3.json 11e3a9652a first 8 lat temu token-binding.json 11e3a9652a first 8 lat temu touch.json 11e3a9652a first 8 lat temu transforms2d.json 11e3a9652a first 8 lat temu transforms3d.json 11e3a9652a first 8 lat temu ttf.json 11e3a9652a first 8 lat temu typedarrays.json 11e3a9652a first 8 lat temu u2f.json 11e3a9652a first 8 lat temu unhandledrejection.json 11e3a9652a first 8 lat temu upgradeinsecurerequests.json 11e3a9652a first 8 lat temu url.json 11e3a9652a first 8 lat temu urlsearchparams.json 11e3a9652a first 8 lat temu use-strict.json 11e3a9652a first 8 lat temu user-select-none.json 11e3a9652a first 8 lat temu user-timing.json 11e3a9652a first 8 lat temu variable-fonts.json 11e3a9652a first 8 lat temu vibration.json 11e3a9652a first 8 lat temu video.json 11e3a9652a first 8 lat temu videotracks.json 11e3a9652a first 8 lat temu viewport-units.json 11e3a9652a first 8 lat temu wai-aria.json 11e3a9652a first 8 lat temu wasm.json 11e3a9652a first 8 lat temu wav.json 11e3a9652a first 8 lat temu wbr-element.json 11e3a9652a first 8 lat temu web-animation.json 11e3a9652a first 8 lat temu web-app-manifest.json 11e3a9652a first 8 lat temu web-bluetooth.json 11e3a9652a first 8 lat temu web-share.json 11e3a9652a first 8 lat temu webgl.json 11e3a9652a first 8 lat temu webgl2.json 11e3a9652a first 8 lat temu webm.json 11e3a9652a first 8 lat temu webp.json 11e3a9652a first 8 lat temu websockets.json 11e3a9652a first 8 lat temu webusb.json 11e3a9652a first 8 lat temu webvr.json 11e3a9652a first 8 lat temu webvtt.json 11e3a9652a first 8 lat temu webworkers.json 11e3a9652a first 8 lat temu will-change.json 11e3a9652a first 8 lat temu woff.json 11e3a9652a first 8 lat temu woff2.json 11e3a9652a first 8 lat temu word-break.json 11e3a9652a first 8 lat temu wordwrap.json 11e3a9652a first 8 lat temu x-doc-messaging.json 11e3a9652a first 8 lat temu x-frame-options.json 11e3a9652a first 8 lat temu xhr2.json 11e3a9652a first 8 lat temu xhtml.json 11e3a9652a first 8 lat temu xhtmlsmil.json 11e3a9652a first 8 lat temu xml-serializer.json 11e3a9652a first 8 lat temu adminSystem - Gogs: Go Git Service

Keine Beschreibung

FFIB: 11e3a9652a first vor 8 Jahren
..
LICENSE 11e3a9652a first vor 8 Jahren
README.md 11e3a9652a first vor 8 Jahren
cache.js 11e3a9652a first vor 8 Jahren
changelog.md 11e3a9652a first vor 8 Jahren
package.json 11e3a9652a first vor 8 Jahren

README.md

file-entry-cache

Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process — Edit

NPM Version Build Status

install

npm i --save file-entry-cache

Usage

// loads the cache, if one does not exists for the given
// Id a new one will be prepared to be created
var fileEntryCache = require('file-entry-cache');

var cache = fileEntryCache.create('testCache');

var files = expand('../fixtures/*.txt');

// the first time this method is called, will return all the files
var oFiles = cache.getUpdatedFiles(files);

// this will persist this to disk checking each file stats and
// updating the meta attributes `size` and `mtime`.
// custom fields could also be added to the meta object and will be persisted
// in order to retrieve them later
cache.reconcile();

// use this if you want the non visited file entries to be kept in the cache
// for more than one execution
//
// cache.reconcile( true /* noPrune */)

// on a second run
var cache2 = fileEntryCache.create('testCache');

// will return now only the files that were modified or none
// if no files were modified previous to the execution of this function
var oFiles = cache.getUpdatedFiles(files);

// if you want to prevent a file from being considered non modified
// something useful if a file failed some sort of validation
// you can then remove the entry from the cache doing
cache.removeEntry('path/to/file'); // path to file should be the same path of the file received on `getUpdatedFiles`
// that will effectively make the file to appear again as modified until the validation is passed. In that
// case you should not remove it from the cache

// if you need all the files, so you can determine what to do with the changed ones
// you can call
var oFiles = cache.normalizeEntries(files);

// oFiles will be an array of objects like the following
entry = {
  key: 'some/name/file', the path to the file
  changed: true, // if the file was changed since previous run
  meta: {
    size: 3242, // the size of the file
    mtime: 231231231, // the modification time of the file
    data: {} // some extra field stored for this file (useful to save the result of a transformation on the file
  }
}

Motivation for this module

I needed a super simple and dumb in-memory cache with optional disk persistence (write-back cache) in order to make a script that will beautify files with esformatter to execute only on the files that were changed since the last run.

In doing so the process of beautifying files was reduced from several seconds to a small fraction of a second.

This module uses flat-cache a super simple key/value cache storage with optional file persistance.

The main idea is to read the files when the task begins, apply the transforms required, and if the process succeed, then store the new state of the files. The next time this module request for getChangedFiles will return only the files that were modified. Making the process to end faster.

This module could also be used by processes that modify the files applying a transform, in that case the result of the transform could be stored in the meta field, of the entries. Anything added to the meta field will be persisted. Those processes won't need to call getChangedFiles they will instead call normalizeEntries that will return the entries with a changed field that can be used to determine if the file was changed or not. If it was not changed the transformed stored data could be used instead of actually applying the transformation, saving time in case of only a few files changed.

In the worst case scenario all the files will be processed. In the best case scenario only a few of them will be processed.

Important notes

  • The values set on the meta attribute of the entries should be stringify-able ones if possible, flat-cache uses circular-json to try to persist circular structures, but this should be considered experimental. The best results are always obtained with non circular values
  • All the changes to the cache state are done to memory first and only persisted after reconcile.
  • By default non visited entries are removed from the cache. This is done to prevent the file from growing too much. If this is not an issue and you prefer to do a manual pruning of the cache files, you can pass true to the reconcile call. Like this:
  cache.reconcile( true /* noPrune */ );

License

MIT