cache the absence of an announcement as well
This commit is contained in:
parent
925a59010c
commit
6e952a2928
1 changed files with 2 additions and 2 deletions
|
@ -23,8 +23,8 @@ class Announcement(models.Model):
|
|||
|
||||
@classmethod
|
||||
def get_current(cls):
|
||||
result = cache.get('site:announcement', None)
|
||||
if result is not None:
|
||||
result = cache.get('site:announcement', False)
|
||||
if result is not False:
|
||||
return result
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue