一个简单的muffin框架的dogpilecache助手插件

muffin-dogpilecache的Python项目详细描述


muffin dogpilecache–一个用于muffin框架的简单dogpilecache辅助插件。

要求

  • python=3.4
  • 松饼=0.5.5

安装

muffin dogpilecache应该使用pip安装:

pip install muffin-dogpilecache

用法

muffin dogpilecache添加到muffin插件列表:

importmuffinapp=muffin.Application('example',PLUGINS=('muffin_dogpilecache',))

dogpile.cache

添加配置
DOGPILECACHE_CONFIGS={'cache.local.backend':'dogpile.cache.dbm','cache.local.arguments.filename':'./dbmfile.dbm','cache.redis.backend':'dogpile.cache.redis','cache.redis.arguments.host':'localhost','cache.redis.arguments.port':6379,}

将每个配置与dogpile.cache区域关联

DOGPILECACHE_REGIONS={'default':'cache.local.','redis':'cache.redis.',}

装饰您的功能:

@app.ps.dogpilecache.default.cache_on_arguments()defmy_local_cached_function():...@app.ps.dogpilecache.redis.cache_on_arguments()defmy_redis_cached_function():...

选项

OptionDescription
DOGPILECACHE_CONFIGSConfigurations for regions
DOGPILECACHE_REGIONSRegions related with the configurations prefix
DOGPILECACHE_TESTIf true, set regions with dogpile.cache.null
DOGPILECACHE_FUNCTION_KEY_GENERATORA function to generate custom cache keys

许可证

根据MIT license授权。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
在Eclipse中使用多个调用在一行上打印java   javajackson序列化问题。只有同一实体的第一个对象可以很好地序列化   Java中Deflate函数的等价充气   使用customlitview的java Android actionbar搜索   java“<T>T get()”是什么意思?(它有用吗?)   目标c使用CommonCrypto使用AES256加密,使用OpenSSL或Java解密   java在运行时更新资源文件   fileinputstream在java中访问并将数据写入现有文件   带集群的java Android Mapbox我希望每个功能都有不同的标记图像   java JDK8>JDK10:PKIX路径生成失败:SunCertPathBuilderException:找不到请求目标的有效证书路径   java使用Hk2生成具有指定构造函数参数的实例   为什么这个系统。出来Java中的println()打印到控制台?   java目录和文件名连接不起作用   使用mockito和通配符绘图的java