mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 07:27:04 +00:00
Disable notification cache
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
from django.core.cache import cache
|
||||
|
||||
from seahub.notifications.models import Notification
|
||||
|
||||
from seahub.notifications.settings import NOTIFICATION_CACHE_TIMEOUT
|
||||
def refresh_cache():
|
||||
"""
|
||||
Function to be called when change primary notification.
|
||||
"""
|
||||
cache.set('CUR_TOPINFO', Notification.objects.all().filter(primary=1),
|
||||
24*60*60)
|
||||
NOTIFICATION_CACHE_TIMEOUT)
|
||||
|
||||
|
Reference in New Issue
Block a user