예제 #1
0
def get_data_from_cache():
    "verify data in cache"
    widgets_with_data = []
    for w in Widget.objects.all():
        ck = get_data_cache_key(widget=w)
        data = storage.get(ck)
        if data: widgets_with_data.append(w)
    return widgets_with_data
예제 #2
0
파일: tests.py 프로젝트: Almad/mypage
def get_data_from_cache():
    "verify data in cache"
    widgets_with_data = []
    for w in Widget.objects.all():
        ck = get_data_cache_key(widget=w)
        data = storage.get(ck)
        if data: widgets_with_data.append(w)
    return widgets_with_data
예제 #3
0
def clear_widgets_data_cache():
    "clear widgets' data in cache"
    for w in Widget.objects.all():
        ck = get_data_cache_key(widget=w)
        storage.delete(ck)
예제 #4
0
파일: tests.py 프로젝트: Almad/mypage
def clear_widgets_data_cache():
    "clear widgets' data in cache"
    for w in Widget.objects.all():
        ck = get_data_cache_key(widget=w)
        storage.delete(ck)