Python 缓存库 supycache

码农软件 · 软件分类 · 缓存系统 · 2019-08-30 06:11:24

软件介绍

supycache 是 Python 对缓存的简单封装库,支持包括内存缓存、memcached 和 redis。

示例代码:

import time
import supycache

@supycache.supycache(cache_key='result')
def execute_expensive():
    time.sleep(15)
    return 42

print execute_expensive()  # This will take 15 seconds to execute ...
42
print execute_expensive()  # ...not this tho', because the value is cached ...
42
print supycache.default_backend.get('result') # ..keyed as `result`
42

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

Data Structures and Algorithms with JavaScript

Data Structures and Algorithms with JavaScript

Michael McMillan / O'Reilly Media / 2014-2-22 / USD 28.51

If you’re using JavaScript on the server-side, you need to implement classic data structures that conventional object-oriented programs (such as C# and Java) provide. This practical book shows you how......一起来看看 《Data Structures and Algorithms with JavaScript》 这本书的介绍吧!

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

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

HEX HSV 互换工具