首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

谢天谢地 django的memcache backend是线程保险的

2012-12-22 
谢天谢地django的memcache backend是线程安全的~因为项目要用到memcache,一直头疼于memcache python绑定的

谢天谢地 django的memcache backend是线程安全的~

因为项目要用到memcache,一直头疼于memcache python绑定的线程安全问题,今天无意中才发现,django的cachebackend已经处理好了~

?写道Django relies on the cache backend to be thread-safe, and a single instance of a memcache.Client is not thread-safe. The issue is with Django only creating a single instance that is shared between all threads (django.core.cache.cache).

?大致意思是,python的client不是线程安全的,django是靠它自己的cache backend才实现了线程安全,所有的django线程都是公用一个链接实例去链接memcache的。

?

?

http://code.djangoproject.com/ticket/3701

?

?

?

热点排行