django - 为 django 项目安装 memcached

标签 django linux caching memcached

来自 django 文档:

After installing Memcached itself, you'll need to install a memcached binding. There are several python memcached bindings available; the two most common are python-memcached and pylibmc.

pylibmc 文档有自己的要求:

-libmemcached 0.32 or later (last test with 0.51)
-zlib (required for compression support)
-libsasl2 (required for authentication support)

所以在我看来,我需要做以下事情:

-install memcached
-install libmemcached
-install zlib
-install libsas12
-install pylibmc

如何/在哪里可以做到这一点?我已经习惯于 pip 安装我需要的任何东西,但我什至无法分辨其中哪些是 python 包。这些是捆绑在一起的吗?

最佳答案

只需执行 pip install python-memcached 就可以了。

至于自己安装memcached,就看你所在的平台了。

在 OS X/Linux 上,只需在命令行中运行 memcached

关于django - 为 django 项目安装 memcached,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7636108/

相关文章:

mysql - 更新和插入查询之间的死锁

mysql - 在具有在全局 python2.7 下运行的预先存在的 Flask 应用程序的计算机上使用 python 3.4 virtualenv 让 Django Apache Mysql WSGI 工作

linux - 我搞砸了在 Ubuntu 上设置 ufw 防火墙,无法再登录到我的服务器

asp.net - 如何在 MVC4 中将对象添加到缓存并从缓存中访问数据?

javascript - Django : Files not passed in the request even after setting enctype=multipart/form-data?

python - 转换用户上传的视频文件并使用 django、python 提供服务

linux - 我如何在 shell 中使用函数编写这个

linux - 在服务器机器上安装软件 - 安装过程想要修改我无法访问的根文件夹

caching - 2 计算机基础问题

asp.net - 从静态方法读取和写入 ASP.NET 缓存