agentzh/srcache-nginx-module — pull request #26 by asierguti (2014-03-14 13:36:42+00:00)
Title: Added expiration time variable

We are working on using srcache for caching data from our backend servers into our own database, sos that the frontend server can just retrieve the data from the cache.

In order to make sure that the data gets purged from time to time, and that we don't send "old" data from the cache, we wanted to add an "Expires" variable in the data header that is being cached, so that we know when we have to recache the data, and when we have to delete old data.

This patch just adds a new configuration variable in the form of "srcache_cache_valid ", and a callback to analyze the expiration time from the fetched data and make sure we recache the data if the one in the cache is old enough.