This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""An example of a cache decorator.""" | |
import json | |
from functools import wraps | |
from redis import StrictRedis | |
redis = StrictRedis() | |
def cached(func): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UPDATE IN 2020 | |
# You almost always will want to use the version at | |
# https://github.com/luispedro/imread, which is | |
# up-to-date and works with Python 3 | |
# Copyright: Luis Pedro Coelho <[email protected]>, 2012 |