I'm thinking about create an etag with an expire date.
Actually I create an etag with a large number of parameters but I would like to make it with an expire date.
I have the solution to keep an information in the server side but I prefer to encode any information into.
I'm searching the better way to do that.
开发者_StackOverflow中文版def etag_max_age(hash_code, max_age=30):
# do something...
return etag_with_max_age
def etag_max_age_expired(etag):
# do some verifications
return True or False
I'm thinking about a solution with cookie
My solution to the problem would be to add a timestamp to the end of the etag in the form of hash-timestamp
. You could then parse that out when you needed it.
精彩评论