def uncache_switch(**kwargs): switch = kwargs.get('instance') cache.set(keyfmt(get_setting('SWITCH_CACHE_KEY'), switch.name), None, 5) cache.set(keyfmt(get_setting('ALL_SWITCHES_CACHE_KEY')), None, 5)
def uncache_sample(**kwargs): sample = kwargs.get('instance') cache.set(keyfmt(get_setting('SAMPLE_CACHE_KEY'), sample.name), None, 5) cache.set(keyfmt(get_setting('ALL_SAMPLES_CACHE_KEY')), None, 5)