{"id":13781705,"url":"https://github.com/thinkjs/think-memcache","last_synced_at":"2025-07-04T18:33:20.274Z","repository":{"id":73609587,"uuid":"86277707","full_name":"thinkjs/think-memcache","owner":"thinkjs","description":"ThinkJS memcache","archived":false,"fork":false,"pushed_at":"2021-07-01T00:18:16.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-30T22:03:18.074Z","etag":null,"topics":["memcache"],"latest_commit_sha":null,"homepage":"","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/thinkjs.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}},"created_at":"2017-03-27T01:22:32.000Z","updated_at":"2021-07-01T00:18:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"c90f9200-f5e4-4e86-a073-6a7cf6766975","html_url":"https://github.com/thinkjs/think-memcache","commit_stats":{"total_commits":14,"total_committers":4,"mean_commits":3.5,"dds":0.3571428571428571,"last_synced_commit":"e7e1af7f49468f52447ddc1fc133d32f177d746b"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-memcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-memcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-memcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-memcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkjs","download_url":"https://codeload.github.com/thinkjs/think-memcache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248250743,"owners_count":21072682,"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":["memcache"],"created_at":"2024-08-03T18:01:28.442Z","updated_at":"2025-04-10T19:37:14.069Z","avatar_url":"https://github.com/thinkjs.png","language":"JavaScript","readme":"# think-memcache\n[![Build Status](https://travis-ci.org/thinkjs/think-memcache.svg?branch=master)](https://travis-ci.org/thinkjs/think-memcache)\n[![Coverage Status](https://coveralls.io/repos/github/thinkjs/think-memcache/badge.svg?branch=master)](https://coveralls.io/github/thinkjs/think-memcache?branch=master)\n[![npm](https://img.shields.io/npm/v/think-memcache.svg?style=flat-square)](https://www.npmjs.com/package/think-memcache)\n\n\n## Install\n\n```\nnpm install think-memcache\n```\n\n## How to Usage\n\n### default options\n\nYou can find all the config options at http://memcache-plus.com/\n\n```js\nconst defaultOptions = {\n  hosts: ['127.0.0.1:11211'],\n  maxValueSize: 1048576,\n  netTimeout: 5000,\n  reconnect: true\n}\n```\n\n### usage\n\n```js\nimport Memcache from '../index';\n\nlet memInst = new Memcache(config);\n\n// set key, expire should be milliseconds\nlet s1 = await memInst.set('name2', 'lushijie'); // expire = 0\nlet s2 = await memInst.set('name3', 'lushijie', 3000); // milliseconds\n\n// get key's value\nlet g1 = await memInst.get('name2');\n\n// delete key\nawait memInst.delete(key);\n\n// increase 1, key'value should be integer, if key not exist will do nothing\nawait memInst.increase(key);\n\n// decrease 1, key'value should be integer, if key not exist will do nothing\nawait memInst.decrease(key);\n\n```\n\n","funding_links":[],"categories":["Others"],"sub_categories":["websocket"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-memcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkjs%2Fthink-memcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-memcache/lists"}