1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-25 14:43:15 +00:00
seahub/notifications/utils.py

12 lines
292 B
Python

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)