Skip to content

Cache anything in the current request cycle in memory for preventing duplicate method callers.

License

Notifications You must be signed in to change notification settings

baranbartu/rcmemoize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rcmemoize (Django)

Cache anything in the current request cycle in memory for preventing duplicate method callers.
It works for Django only for now. But can be contributed to extend other Python Web Frameworks like Flask, Bottle, TurboGears etc.

Installation

pip install rcmemoize

Configuration

Add INSTALLED_APPS
rcmemoize
Add bottom of the of the MIDDLEWARE_CLASSES
rcmemoize.middleware.memoization_middleware.RequestCycleMemoizationMiddleware

Usage

from rcmemoize.memoization import request_cycle_memoize

@request_cycle_memoize()
def your_method(*args,**kwargs):
...

CONTRIBUTE

All contributions are very welcomed!

About

Cache anything in the current request cycle in memory for preventing duplicate method callers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages