Пример #1
0
def get_recent_object_pks_for_model(model_class):
    config = get_config(model_class)
    cache_key = get_model_cache_key(model_class)
    pks = set()
    for cache in get_caches(config["caches"]):
        pks.update(cache.get_pks(model_class, config, cache_key))
    return list(pks)
Пример #2
0
def get_recent_object_pks_for_model(model_class):
    config = get_config(model_class)
    cache_key = get_model_cache_key(model_class)
    pks = set()
    for cache in get_caches(config["caches"]):
        pks.update(cache.get_pks(model_class, config, cache_key))
    return list(pks)
Пример #3
0
def remove_object_pk_from_caches(obj, config):
    cache_key = get_model_cache_key(obj.__class__)
    for cache in get_caches(config["caches"]):
        cache.remove(obj, config, cache_key)
Пример #4
0
def add_object_pk_to_caches(obj, config):
    cache_key = get_model_cache_key(obj.__class__)
    for cache in get_caches(config["caches"]):
        cache.add(obj, config, cache_key)
Пример #5
0
def remove_object_pk_from_caches(obj, config):
    cache_key = get_model_cache_key(obj.__class__)
    for cache in get_caches(config["caches"]):
        cache.remove(obj, config, cache_key)
Пример #6
0
def add_object_pk_to_caches(obj, config):
    cache_key = get_model_cache_key(obj.__class__)
    for cache in get_caches(config["caches"]):
        cache.add(obj, config, cache_key)