{"bugs":{"url":"https://github.com/apollographql/apollo-server/issues"},"dist":{"shasum":"454bad243c1d173a5435fa9517bad1e10db3fa25","tarball":"https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-0.3.0-alpha.2.tgz","fileCount":21,"integrity":"sha512-NCf4EiFhcNse42BGr0nIAll9XSZq52fNwbNPearPIKZ4ssSQfmplRww7m++bZKm5ChmzHJnabCA8h/FHMWYB3w==","signatures":[{"sig":"MEYCIQDXFhcOqDWT5laAi0O4KDaIWbCF6cjSsYkr9/6eOoJjNAIhAN33pBliLXus7FpyINi+NxwugC0j71usw16vGjwdcgai","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSHMjCRA9TVsSAnZWagAA44wP/2tKUrdrN4cEyKCewoa3\nbDqIkRxBPTMtq2Ruf0+5FJbJ9ClpLGp9/ZUkZaoeiKgxIRhj8coDwfUgUmdg\nOwELLApn/aqp7ObUMGlCC/fvTM1C5ue3gI/CHIQnsx75zLnvAKNIUF4zI5IW\nmp67dq/yzZCzHUnEAexQpaUHmak250DnVRolpOTVKJU2TJrreVJlXmeOCVMT\nxBxfGDkwj+XuiUOy6h0NijTor4JmC3QMftMvCgQJBkNNVDMu6eenIPbWLcAX\nr+jN4WU3KepH5d1g84Zgyc4HVZcVWyw8XZww342ZlVwxWRGSDOqoLhHGHpBY\nc5H+B0J+LkaV2NV81Jl03rCvq8O17iyXx9OvPRZqDY/PkPXFfHG2LNL2CyZM\no3L2OffT/FekKHG8Wo//F4TT63C1SqfhaTN4AmlO6mwwY42i871rhCWBB7rY\nKPN22p11WXJX6zGjUd5AjcLIDzap2R16twEnjFzPMCPsm6gNdwouf/yYo69X\nHO7XxtMz2aSfSCCFpfVrHUwxcKD5Bz7COxK9buPtkoJzEQbcXpXp/vamZUDy\nQkNaoF7j5cdUyWr6HBWn/8lNmvMf2P6DrZ1vhEYbAzarZrDaLdsU2O0dzTwz\nmXs1YDSWe8qxxv2LPm8eMqMUfU3EwyjHBlh/z+LCXscm5WS41ToibUzzXY37\ntmF5\r\n=NGpW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","name":"apollo-server-caching","types":"dist/index.d.ts","author":{"name":"opensource@apollographql.com"},"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## Testing cache implementations\n\n### Test helpers\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\nThe default `testKeyValueCache` helper will run all key-value store tests on the specified store, including basic `get` and `set` functionality, along with time-based expunging rules.\n\nSome key-value cache implementations may not be able to support the full suite of tests (for example, some tests might not be able to expire based on time).  For those cases, there are more granular implementations which can be used:\n\n* `testKeyValueCache_Basic`\n* `testKeyValueCache_Expiration`\n\nFor more details, consult the [source for `apollo-server-caching`](./src/__tests__/testsuite.ts).\n\n### Running tests\n\nRun tests with `jest --verbose`\n","engines":{"node":">=6"},"gitHead":"f045a4d0c94faa61433a933edd34e274319f8f32","license":"MIT","_npmUser":{"name":"apollo-bot","email":"npm@apollographql.com"},"homepage":"https://github.com/apollographql/apollo-server#readme","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.","repository":{"url":"https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-caching","type":"git"},"_npmVersion":"lerna/3.10.6/node@v8.15.0+x64 (darwin)","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)","directories":{},"maintainers":[{"name":"apollo-bot","email":"npm@apollographql.com"}],"_nodeVersion":"8.15.0","dependencies":{"lru-cache":"^5.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/apollo-server-caching_0.3.0-alpha.2_1548251938616_0.849843219848943","host":"s3://npm-registry-packages"},"_id":"apollo-server-caching@0.3.0-alpha.2","version":"0.3.0-alpha.2"}