Пример #1
0
def uncache_switch(**kwargs):
    switch = kwargs.get('instance')
    cache.delete(keyfmt(get_setting('SWITCH_CACHE_KEY'), switch.name, switch.site))
    cache.delete(keyfmt(get_setting('ALL_SWITCHES_CACHE_KEY')))
Пример #2
0
def uncache_sample(**kwargs):
    sample = kwargs.get('instance')
    cache.set(keyfmt(get_setting('SAMPLE_CACHE_KEY'), sample.name, sample.site), None, 5)
    cache.delete(keyfmt(get_setting('ALL_SAMPLES_CACHE_KEY')))