"""

"""

from datetime import datetime, timedelta

def set_trace():
    import pdb, sys
    debugger = pdb.Pdb(stdin=sys.__stdin__, stdout=sys.__stdout__)
    debugger.set_trace(sys._getframe().f_back)


def add_cache_forever_headers(response, etag):
    expire_time = datetime.utcnow()+timedelta(days=360)
    response["Expires"] = expire_time.strftime('%a, %d %b %Y %H:%M:%S GMT')
    response["Cache-Control"] = 'public,max-age=%d' % int(3600*24*360)
    response["ETag"] = etag
    return response

