Guest User

Untitled

a guest
May 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. # Default TTL and grace
  2. set obj.grace = 604800s;
  3. set obj.ttl = 604800s;
  4.  
  5. # For really young (last-modified < 15 min ago) objects, use lower (1 min) ttl
  6. if (obj.http.Last-Modified) {
  7. C{
  8. #include <sys/time.h>
  9.  
  10. struct timeval tv;
  11. gettimeofday(&tv, 0);
  12.  
  13. if (tv.tv_sec - TIM_parse(VRT_GetHdr(sp, HDR_OBJ, "\016Last-Modified:")) < 900) {
  14. VRT_l_obj_ttl(sp, 60);
  15. }
  16. }C
  17. }
Add Comment
Please, Sign In to add comment