public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Default TTL and grace
set obj.grace = 604800s;
set obj.ttl = 604800s;
# For really young (last-modified < 15 min ago) objects, use lower (1 min) ttl
if (obj.http.Last-Modified) {
C{
#include <sys/time.h>
struct timeval tv;
gettimeofday(&tv, 0);
if (tv.tv_sec - TIM_parse(VRT_GetHdr(sp, HDR_OBJ, "\016Last-Modified:")) < 900) {
VRT_l_obj_ttl(sp, 60);
}
}C
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.