Python 高速缓存和会话库 Beaker

码农软件 · 软件分类 · 缓存系统 · 2019-08-29 20:28:01

软件介绍

Beaker,高速缓存和会话的库,用于Web应用以及独立的Python脚本。这个库还包含用于Web应用的WSGI中间件。Beaker 基于 Perl Cache::Cache 开发。

特性:

  • 速度快,强大的性能

  • 多读/写单锁系统,以避免重复同时创建缓存

  • 缓存后端包括DBM,文件,内存,memcached和数据库

  • 签名的cookie防止会话劫持/欺骗

  • 唯一的Cookie会话来删除一个数据库或文件后端

示例代码:

# Assuming that cache is an already created CacheManager instance
tmpl_cache = cache.get_cache('mytemplate.html', type='dbm', expire=3600)

search_param = 'gophers'

def get_results():
    # do something to retrieve data
    data = get_data(search_param)
    return data

# Cache this function, based on the search_param, using the tmpl_cache
# instance from the prior example
results = tmpl_cache.get(key=search_param, createfunc=get_results)

本文地址:https://www.codercto.com/soft/d/13454.html

Convergence Culture

Convergence Culture

Henry Jenkins / NYU Press / 2006-08-01 / USD 30.00

"Convergence Culture" maps a new territory: where old and new media intersect, where grassroots and corporate media collide, where the power of the media producer, and the power of the consumer intera......一起来看看 《Convergence Culture》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具