Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        def werkzeug_cache_get_or_add(cache, key, new_obj, expiry_seconds):
    stored_obj = None
    while stored_obj is None:
        cache.add(key, new_obj, expiry_seconds)
        stored_obj = cache.get(key)
    return stored_obj
        


src/f/l/Flask-WebCache-0.9.1/flask_webcache/storage.py   Flask-WebCache(Download)
from werkzeug.datastructures import parse_set_header
 
from .utils import (make_salt, effective_max_age, none_or_truthy,
                    werkzeug_cache_get_or_add)
from .recache import RECACHE_HEADER
            new = Metadata(response.vary, make_salt())
            key = self.metadata_cache_key()
            return werkzeug_cache_get_or_add(self.cache, key, new,
                                             expiry_seconds)
    def store_response(self, metadata, response, expiry_seconds):

src/f/l/flask-webcache-HEAD/flask_webcache/storage.py   flask-webcache(Download)
from werkzeug.datastructures import parse_set_header
 
from .utils import (make_salt, effective_max_age, none_or_truthy,
                    werkzeug_cache_get_or_add)
from .recache import RECACHE_HEADER
            new = Metadata(response.vary, make_salt())
            key = self.metadata_cache_key()
            return werkzeug_cache_get_or_add(self.cache, key, new,
                                             expiry_seconds)
    def store_response(self, metadata, response, expiry_seconds):