0.5.2 • Published 10 months ago

@commitspark/git-adapter-cache-memory v0.5.2

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

Introduction

Commitspark is a set of tools to manage structured data with Git through a GraphQL API.

This repository holds code for a GitAdapter that implements in-memory caching of data returned by a wrapped child GitAdapter for calls to getEntries() and getSchema(). Calls to getLatestCommitHash() are not cached by default but users can provide their own implementation to also cache responses to this call according to their own caching strategy. Calls to createCommit() are never cached and always forwarded to the child adapter.

Usage

Instantiate the adapter with createAdapter() and then call setRepositoryOptions() with MemoryCacheAdapterOptions on the instance. These options are as follows:

Option nameRequiredDefault valueDescription
childAdapterTrueGitAdapter instance to wrap
getLatestCommitHashFalseundefinedCustom caching function

License

The code in this repository is licensed under the permissive ISC license (see LICENSE).

0.5.0

10 months ago

0.5.2

10 months ago

0.5.1

10 months ago

0.4.0

2 years ago