Have ideas to improve npm?Join in the discussion! »

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

    0.8.0 • 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.

    Keywords

    none

    Install

    npm i apollo-server-cache-memcached

    DownloadsWeekly Downloads

    2,860

    Version

    0.8.0

    License

    MIT

    Unpacked Size

    10.6 kB

    Total Files

    10

    Last publish

    Collaborators

    • avatar