/funcacher

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

https://travis-ci.org/d2207197/funcacher.svg?branch=master

Cache any pure function to specific cache service(default to memcache). For memcache, function arguments and return value objects should be serializable by the Pickle module.

from funcacher import FunCacher
funcacher = FunCacher()


@funcacher('add') # keyword for distinguishing
def add(a, b):
    return a + b