Commit fa2bee8d authored by Stefano Sanfilippo's avatar Stefano Sanfilippo

Fixing datetime typo in @cacheable

parent dafec2b3
......@@ -53,8 +53,8 @@ def cache(seconds):
"""
def set_cacheable(get_function):
def wrapper(self, *args, **kwargs):
self.set_header("Expires", datetime.datetime.utcnow() +
datetime.timedelta(seconds=seconds))
self.set_header("Expires", datetime.utcnow() +
timedelta(seconds=seconds))
self.set_header("Cache-Control", "max-age=" + str(seconds))
return get_function(self, *args, **kwargs)
return wrapper
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment