How to calculate max-age

I need to receive a response header that has a max-age directive. The header makes the extension add item to a list. How can I calculate the max-age and periodically check it to delete the item from the list after the max-age expires?