{"id":21831421,"url":"https://github.com/nodef/map-cached","last_synced_at":"2026-05-09T13:04:31.853Z","repository":{"id":90491469,"uuid":"107175290","full_name":"nodef/map-cached","owner":"nodef","description":"Fully Cached interface for a Promised Map.","archived":false,"fork":false,"pushed_at":"2018-04-24T00:22:01.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T09:15:52.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/map-cached","language":"JavaScript","has_issues":false,"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/nodef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-16T19:45:38.000Z","updated_at":"2017-10-16T19:46:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"103374dc-d25f-4463-8b1f-29e781d987cd","html_url":"https://github.com/nodef/map-cached","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fmap-cached","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fmap-cached/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fmap-cached/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fmap-cached/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodef","download_url":"https://codeload.github.com/nodef/map-cached/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244803644,"owners_count":20512958,"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":[],"created_at":"2024-11-27T19:10:22.590Z","updated_at":"2026-05-09T13:04:31.842Z","avatar_url":"https://github.com/nodef.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# map-cached\n\n[![NPM](https://nodei.co/npm/map-cached.png)](https://nodei.co/npm/map-cached/)\n\nFully Cached interface for a Promised Map.\n\n```javascript\nvar MapCached = require('map-cached');\n// MapCached(\u003csource\u003e, \u003cset-cache\u003e);\n// source:    a promised map, like MapPg (map-pg)\n// set-cache: size of set cache, flushed when full or manually\n```\n```javascript\nvar MapPromised = require('map-promised');\nvar MapCached = require('map-cached');\n\nvar mapp = new MapPromised(new Map());\nvar mapc = new MapCached(mapp);\nmapp.setup().then(() =\u003e {\n  mapp.set('a', 1);\n}).then(() =\u003e {\n  return mapc.setup();\n}).then(() =\u003e {\n  mapc.set('b', 2);\n  mapc.size;             // 2\n  mapc.get('b');         // 2\n  mapc.get('a');         // 1\n  mapc.delete('b');\n  mapc.size;             // 1\n  mapc.set('c', 3);\n  mapc.set('d', 4);\n  mapc.size;             // 3\n  mapc.flush().then(() =\u003e {\n    return mapp.size;\n  }).then((ans) =\u003e ans); // 3\n  // ...\n});\n```\n\n![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/map-cached)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fmap-cached","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodef%2Fmap-cached","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fmap-cached/lists"}