1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-05-07 07:27:44 +00:00
seahub/notifications/utils.py

12 lines
292 B
Python
Raw Normal View History

from django.core.cache import cache
from seahub.notifications.models import Notification
def refresh_cache():
"""
Function to be called when change primary notification.
"""
cache.set('CUR_TOPINFO', Notification.objects.all().filter(primary=1),
24*60*60)