{"id":15857416,"url":"https://github.com/timmikeladze/keyv-arango","last_synced_at":"2026-02-06T08:04:18.040Z","repository":{"id":64700615,"uuid":"577576814","full_name":"TimMikeladze/keyv-arango","owner":"TimMikeladze","description":"ArangoDB store for Keyv: simple key-value storage with support for multiple backends.","archived":false,"fork":false,"pushed_at":"2023-04-17T15:18:17.000Z","size":32,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T20:51:22.016Z","etag":null,"topics":["arango","arangodb","cache","key-value","key-value-store","keyv","keyvaluestore","storage"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimMikeladze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"ko_fi":"linesofcodedev","custom":["https://www.paypal.me/TimMikeladze"]}},"created_at":"2022-12-13T03:24:26.000Z","updated_at":"2023-01-12T19:57:48.000Z","dependencies_parsed_at":"2023-02-15T20:15:46.882Z","dependency_job_id":null,"html_url":"https://github.com/TimMikeladze/keyv-arango","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimMikeladze%2Fkeyv-arango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimMikeladze%2Fkeyv-arango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimMikeladze%2Fkeyv-arango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimMikeladze%2Fkeyv-arango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimMikeladze","download_url":"https://codeload.github.com/TimMikeladze/keyv-arango/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arango","arangodb","cache","key-value","key-value-store","keyv","keyvaluestore","storage"],"created_at":"2024-10-05T20:22:56.739Z","updated_at":"2026-02-06T08:04:14.675Z","avatar_url":"https://github.com/TimMikeladze.png","language":"TypeScript","funding_links":["https://ko-fi.com/linesofcodedev","https://www.paypal.me/TimMikeladze"],"categories":[],"sub_categories":[],"readme":"# keyv-arango\n\n[ArangoDB](https://github.com/arangodb/arangodb) store for [Keyv](https://github.com/jaredwray/keyv): simple key-value storage with support for multiple backends.\n\n## Install\n\n```shell\nnpm install keyv-arango keyv arangojs\n# or\nyarn add keyv-arango keyv arangojs\n# or\npnpm add keyv-arango keyv arangojs\n```\n\n## Usage\n\n```ts\nimport Keyv from 'keyv'\nimport { KeyvArango, KeyvArangoOptions } from 'keyv-arango'\n\nconst options: KeyvArangoOptions = {\n  // An ArangoDB database config object. This field is required.\n  // If no database is specified, the default `_system` database will be used.\n  config: {\n    url: process.env.ARANGO_URL\n  },\n  // All fields below are optional.\n  cacheCollection: true, // whether to cache the collection instance in between data calls. Defaults to true.\n  collectionName: 'keyv', // the name of the collection to use. Defaults to 'keyv'.\n  expireAfter: 0, // how long to wait before expiring a key (in milliseconds). Defaults to 0.\n  field: 'expireDate', // the name of the field which will store the expiration date. Defaults to 'expireDate'.\n  namespace: null // the keyv namespace to use. Defaults to null.\n}\n\nconst store = new KeyvArango(options)\n\nconst keyv = new Keyv({ store })\n\n// From here on, you can use keyv as usual.\n\nawait keyv.set('foo', 'bar', 1000)\n\nawait keyv.get('foo')\n```\n\n## ArangoDB and TTL Indexes\n\nWhen using TTL indexes in ArangoDB is no guarantee that a key will be deleted at the exact time specified, only that the key will be deleted. ArangoDB runs a background thread which is responsible for cleaning up keys. The frequency of this thread is configurable, but **defaults to 30 seconds**.\n\nThis is an important caveat to keep in mind when using this library and ArangoDB in general. **Without prior configuration, ArangoDB is not suitable for short-lived keys.** When starting an ArangoDB instance the `--ttl.frequency` option can be used to configure the frequency of the background thread. For more information, see the [ArangoDB documentation](https://www.arangodb.com/docs/stable/programs-arangod-options.html#ttl-frequency). In fact the CI tests for this library use a frequency of 1 second to ensure that the tests pass in a timely manner.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimmikeladze%2Fkeyv-arango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimmikeladze%2Fkeyv-arango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimmikeladze%2Fkeyv-arango/lists"}