shared-memory-dict:一个非常简单的共享内存字典实现-源码

上传者: 42129412 | 上传时间: 2021-09-25 00:52:14 | 文件大小: 30KB | 文件类型: ZIP
共享内存区 一个非常简单的字典实现。 要求:Python> = 3.8 >> from shared_memory_dict import SharedMemoryDict >> smd = SharedMemoryDict ( name = 'tokens' , size = 1024 ) >> smd [ 'some-key' ] = 'some-value-with-any-type' >> smd [ 'some-key' ] 'some-value-with-any-type' arg name定义了内存块的位置,因此,如果要在进程之间共享内存,请使用相同的名称 安装 使用pip : pip install shared-memory-dict 锁具 要使用共享内存字典的写操作,请设置环境变量SHARED_MEMORY_USE_LOCK=1 。 Django缓存实现 有

文件下载

资源详情

[{"title":"( 31 个子文件 30KB ) shared-memory-dict:一个非常简单的共享内存字典实现-源码","children":[{"title":"shared-memory-dict-main","children":[{"title":"poetry.lock <span style='color:#111;'> 30.26KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 797B </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 748B </span>","children":null,"spread":false},{"title":"pyproject.toml <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false},{"title":"shared_memory_dict","children":[{"title":"caches","children":[{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"django.py <span style='color:#111;'> 3.01KB </span>","children":null,"spread":false},{"title":"aiocache.py <span style='color:#111;'> 4.13KB </span>","children":null,"spread":false}],"spread":true},{"title":"__init__.py <span style='color:#111;'> 43B </span>","children":null,"spread":false},{"title":"templates.py <span style='color:#111;'> 26B </span>","children":null,"spread":false},{"title":"dict.py <span style='color:#111;'> 4.40KB </span>","children":null,"spread":false},{"title":"hooks.py <span style='color:#111;'> 357B </span>","children":null,"spread":false},{"title":"lock.py <span style='color:#111;'> 480B </span>","children":null,"spread":false}],"spread":true},{"title":"LICENSE <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"CHANGELOG.md <span style='color:#111;'> 1015B </span>","children":null,"spread":false},{"title":"setup.cfg <span style='color:#111;'> 37B </span>","children":null,"spread":false},{"title":".github","children":[{"title":"workflows","children":[{"title":"release.yml <span style='color:#111;'> 570B </span>","children":null,"spread":false},{"title":"main.yml <span style='color:#111;'> 1.01KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"examples","children":[{"title":"gunicorn-aiocache-api","children":[{"title":"gunicorn_config.py <span style='color:#111;'> 209B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 413B </span>","children":null,"spread":false},{"title":"main.py <span style='color:#111;'> 817B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"README.md <span style='color:#111;'> 1.84KB </span>","children":null,"spread":false},{"title":"tests","children":[{"title":"caches","children":[{"title":"test_django.py <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"test_aiocache.py <span style='color:#111;'> 4.61KB </span>","children":null,"spread":false}],"spread":true},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"test_hooks.py <span style='color:#111;'> 916B </span>","children":null,"spread":false},{"title":"test_dict.py <span style='color:#111;'> 6.29KB </span>","children":null,"spread":false}],"spread":true},{"title":"benchmarks","children":[{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"fake_django_settings.py <span style='color:#111;'> 19B </span>","children":null,"spread":false},{"title":"sync.py <span style='color:#111;'> 1.40KB </span>","children":null,"spread":false},{"title":"asynchronous.py <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false}],"spread":true}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明