cache count

This commit is contained in:
Yax 2017-07-09 15:27:59 +02:00
parent 85ad7ec89a
commit 48d45bfb2f
3 changed files with 9 additions and 2 deletions

View file

@ -4,6 +4,7 @@
import logging
import config
from sanic import response
from aiocache import cached
from app import app
from app import cache
from app.models.site import Site
@ -44,7 +45,7 @@ def query_comments(request):
return r
#@cache.cached(timeout=300)
@cached(ttl=300)
@app.route("/comments/count", methods=['GET'])
def get_comments_count(request):
try: