Write a flask-restful version of cache-control. Remove the comments to add back in post methods.

This commit is contained in:
jakedt 2014-03-14 18:39:31 -04:00
parent 60015f0ae0
commit 092e236694
4 changed files with 18 additions and 5 deletions

View file

@ -6,7 +6,7 @@ from flask.ext.restful import abort
from app import app
from endpoints.api import resource, nickname, require_repo_read, RepositoryParamResource
from data import model
from util.cache import cache_control
from util.cache import cache_control_flask_restful
store = app.config['STORAGE']
@ -72,7 +72,7 @@ class RepositoryImage(RepositoryParamResource):
class RepositoryImageChanges(RepositoryParamResource):
""" Resource for handling repository image change lists. """
@cache_control(max_age=60*60) # Cache for one hour
@cache_control_flask_restful(max_age=60*60) # Cache for one hour
@require_repo_read
@nickname('getImageChanges')
def get(self, namespace, repository, image_id):