{"name":"apollo-server-caching","version":"0.2.0-register.2195","author":{"name":"opensource@apollographql.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-caching"},"homepage":"https://github.com/apollographql/apollo-server#readme","bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=6"},"dependencies":{"lru-cache":"^4.1.3"},"gitHead":"e44b5bd3c8b602f549ae52c4cb9d9c7e2488a5c1","_resolved":"","_integrity":"","_from":"file:apollo-server-caching-0.2.0-register.2195.tgz","readme":"# apollo-server-caching\n\n[![npm version](https://badge.fury.io/js/apollo-server-caching.svg)](https://badge.fury.io/js/apollo-server-caching)\n[![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)\n\n## Implementing your own Cache\n\nInternally, Apollo Server uses the `KeyValueCache` interface to provide a caching store for the Data Sources. An in-memory LRU cache is used by default, and we provide connectors for [Memcached](../apollo-server-cache-memcached)/[Redis](../apollo-server-cache-redis) backends.\n\nBuilt with extensibility in mind, you can also implement your own cache to use with Apollo Server, in a way that best suits your application needs. It needs to implement the following interface that can be exported from `apollo-server-caching`:\n\n```typescript\nexport interface KeyValueCache {\n  get(key: string): Promise<string | undefined>;\n  set(key: string, value: string, options?: { ttl?: number }): Promise<void>;\n}\n```\n\n## Running test suite\n\nYou can export and run a jest test suite from `apollo-server-caching` to test your implementation:\n\n```typescript\n// ../__tests__/YourKeyValueCache.test.ts\n\nimport YourKeyValueCache from '../src/YourKeyValueCache';\nimport { testKeyValueCache } from 'apollo-server-caching';\ntestKeyValueCache(new MemcachedCache('localhost'));\n```\n\nRun tests with `jest --verbose`\n","readmeFilename":"README.md","description":"[![npm version](https://badge.fury.io/js/apollo-server-caching.svg)](https://badge.fury.io/js/apollo-server-caching) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)","_id":"apollo-server-caching@0.2.0-register.2195","_npmVersion":"6.4.1","_nodeVersion":"10.5.0","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"dist":{"integrity":"sha512-kKQzQaRyYDXH0n4Em3ZvNQKA4HSYkzZhINIWsgF7RxzALspDeWw1QwOoQJCdjXirWz0iSeYTXLfKP5g01BLxRQ==","shasum":"478294b81b5a948cba99b4fac99536aa335f44ba","tarball":"http://registry-npm.ywwl.com/apollo-server-caching/download/apollo-server-caching-0.2.0-register.2195.tgz","fileCount":19,"unpackedSize":10040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvAkyCRA9TVsSAnZWagAAQnEP/i1Fr6MqPzi1oYNa/iRe\nfSSGv3VtfnTivmLL1dSC2u0GbJrxVY1ddKdbeTIXcTRwF26t700R4yjpGuOE\nDEYL5MW2EZ2s8sFH1jMOIFWLhGDT34fohTJD3WiK4XmsO7Z2Xj4JLzwIoY9U\nAgXgASGRblZoR8lPlr+muj/MRnrSBQGCEpYk1x4+GhNvThMOF32bPt4WY6GW\ne7uCNNONxIkknX8IMAnoq4+qaAGhsSWiXBBwf+cYypO/3/Eh1R3YvLs8dbq/\nhd5QMXhAr9SZKCUreSc8XJqKbg01uF/kBaHngQCEZv7EkfgooFGBZD9gmJoA\nRmYxpNYEk6fN3eWG5TYzv2IYe17y2XnEA+lSoQuEYkfxxYboKcyHyFIdhm3p\nhRJOC4JkVtSEgQx+M/xz/E6G9mElF/S5sTSX1HFb9SPb2sHusgTL4jW8GY3M\nyJI8+7B97Nwr72cofkPNo5kecm1twaSd5jO2adl9xnXNHFRmOvK13hVjjyYp\npzQzWvCuPNpeDDSXO6Iun9N8amg6eU0oFNWnn5VG2Z9kvVmd9lrVH3y2Hbdv\nM3B7aPc6A/BYqjMqRMQ5qxCsBu/2YOGtT7PmBFKitRyZ0oBpqFNWf2aUOFIt\nFxx3wRaLVGLGCxSqiy40aupdIOLrlaIn84NWVUZdwD+65isQx+Be0kGZwL+B\n8QF4\r\n=aOx3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHvnyTl0pygv1+G4pjG0OY/8kmnI/XQhK/5yfVbn+wxiAiA2AHShWtTkzHLddw8PaKaRDssDEzR4mKD35RYYrU/cOQ=="}],"size":3876,"noattachment":false,"key":"/apollo-server-caching/-/apollo-server-caching-0.2.0-register.2195.tgz"},"maintainers":[{"email":"npm@apollographql.com","name":"apollo-bot"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/apollo-server-caching_0.2.0-register.2195_1539049777774_0.40231162890909"},"_hasShrinkwrap":false,"deprecated":"This package is part of the legacy caching implementation used by Apollo Server v2 and v3, and is no longer maintained. We recommend you switch to the newer Keyv-based implementation (which is compatible with all versions of Apollo Server). See https://www.apollographql.com/docs/apollo-server/v3/performance/cache-backends#legacy-caching-implementation for more details.","publish_time":1539049777931,"_cnpm_publish_time":1539049777931,"dist-tags":{"alpha":"3.2.0-alpha.0","latest":"3.3.0","next":"3.1.0","next-v3":"0.300.0-alpha.3","preview":"3.0.0-preview.1","rc":"3.0.0-rc.0","unified":"0.6.1-unified2.0"}}