first commit
This commit is contained in:
commit
3e4574dcdd
163 files changed
+3559
No files matched your search
@@ -0,0 +1,13 @@
|
||||
from apps.appsetting.models import City
|
||||
from django.core.cache import cache
|
||||
|
||||
|
||||
def get_city_list():
|
||||
city = cache.get('city')
|
||||
|
||||
if city is None:
|
||||
city = City.objects.all()
|
||||
# 75 hour cache
|
||||
cache.set('city', city, 60 * 60 * 72)
|
||||
|
||||
return city
|
||||
Reference in new issue
Block a user