Skip to content

cordis/py-memoized

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-memoized

Powerful python memoized decorator

from memoized import memoized
from memoized.const import SELF, FUNCTION
from memoized.invalidate import Expire


class Foo(object):
    @memoized(storage=SELF, invalidate=Expire(60))
    def get_some_data(self):
        return 'foo'


@memoized(storage=FUNCTION, key=lambda p: p.id)
def get_profile_balance(profile):
    return Balance.get_for_profile(profile)

About

Powerful python memoized decorator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published