This package has been deprecated

Author message:

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.

apollo-server-cache-memcached
TypeScript icon, indicating that this package has built-in type declarations

3.3.1 • Public • Published

MemcachedCache

npm version Build Status

This package exports an implementation of KeyValueCache that allows using Memcached as a backing store for resource caching in Data Sources.

Usage

const { MemcachedCache } = require('apollo-server-cache-memcached');

const server = new ApolloServer({
  typeDefs,
  resolvers,
  cache: new MemcachedCache(
    ['memcached-server-1', 'memcached-server-2', 'memcached-server-3'],
    { retries: 10, retry: 10000 }, // Options
  ),
  dataSources: () => ({
    moviesAPI: new MoviesAPI(),
  }),
});

For documentation of the options you can pass to the underlying memcached client, look here.

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i apollo-server-cache-memcached

    Weekly Downloads

    840

    Version

    3.3.1

    License

    MIT

    Unpacked Size

    8.88 kB

    Total Files

    8

    Last publish

    Collaborators

    • apollo-bot