首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误:[cache-manager]未指定memcache驱动程序

错误:[cache-manager]未指定memcache驱动程序
EN

Stack Overflow用户
提问于 2021-02-22 16:46:46
回答 1查看 73关注 0票数 0

我有一个使用nestjs构建的节点项目。我正在尝试设置Memcached,但得到一个错误,即没有指定驱动程序。我在本地安装了Memcached,服务器使用memcached -d启动

这是我的模块导入中的内容

代码语言:javascript
复制
import {CacheModule} from '@nestjs/common';
import * as memcachedStore from 'cache-manager-memcached-store';
import Memcache from 'memcache-pp';


@Modules({
   imports: [
       CacheModule.register({
            store: memcachedStore,
            driver: Memcache
            options: {
                hosts:['127.0.0.1:11211']
            }
       })
   ]
///
})

如何指定驱动程序?

EN

回答 1

Stack Overflow用户

发布于 2021-06-30 19:01:54

使用: import * as Memcache from 'memcache-pp';

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66312490

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档