Python缓存模块 LruCache.py

码农软件 · 软件分类 · 缓存系统 · 2019-08-30 12:56:29

软件介绍

在Py3K里,自带一个cache模块,使用「LRU算法」,能够缓存一些函数或方法放返回值,目前我还在玩Py2K,因此土鳖的造了一个轮子,取名「LruCache.py」,不叫特点的特点:「单进程支持线程安全」

示例代码:

import lru as cache

lru = cache.LruCache(item_max=5)

@lru.fn_cache     
def test_fn(x,y):
    return x,y

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

The Haskell School of Music

The Haskell School of Music

Paul Hudak、Donya Quick / Cambridge University Press / 2018-10-4 / GBP 42.99

This book teaches functional programming through creative applications in music and sound synthesis. Readers will learn the Haskell programming language and explore numerous ways to create music and d......一起来看看 《The Haskell School of Music》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

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

HEX CMYK 互转工具

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

HEX HSV 互换工具