Changeset 52:248c69b19dbf in minitage/eggs/minitage.paste

Show
Ignore:
Timestamp:
08/16/08 11:27:43 (5 months ago)
Author:
kiorky <kiorky@…>
Message:

0.0.1_alpha36


  • Improve varnish default vcl

0.0.1_alpha35


  • Improve varnish default vcl
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • CHANGES.txt

    r51 r52  
    22CHANGES 
    33============== 
     40.0.1_alpha36 
     5--------------- 
     6    - Improve varnish default vcl  
     7 
     80.0.1_alpha35 
     9--------------- 
     10    - Improve varnish default vcl 
     11 
    4120.0.1_alpha34 
    513---------------  
  • minitage/paste/profils/varnish/template/etc/varnish/+project+.vcl_tmpl

    r51 r52  
    2121            error 405 "Not allowed"; 
    2222        } 
    23         lookup; 
     23        purge_url(req.url); 
     24        error 200 "Maybe purged."; 
    2425    } 
    2526 
     
    5960    /* Always cache images and multimedia */ 
    6061    if (req.url ~ "\.(jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|mp3|mp4|m4a|ogg|mov|avi|wmv)$") { 
    61         remove req.http.Cookie; 
    62         lookup; 
    63     } 
    64  
    65     /* lookup plone/archetypes images */ 
    66     if (req.http.content-type ~ "image.*" ) { 
    6762        remove req.http.Cookie; 
    6863        lookup; 
     
    123118} 
    124119 
    125 /* Deal with purge requests */ 
    126 sub vcl_hit { 
    127     if (req.request == "PURGE") { 
    128         set obj.ttl = 0s; 
    129         error 200 "Purged"; 
    130     } 
    131     if (!obj.cacheable) { 
    132         pass; 
    133     } 
    134     deliver; 
    135 } 
    136  
    137 sub vcl_miss { 
    138     if (req.request == "PURGE") { 
    139         error 404 "Not in cache"; 
    140     } 
    141     fetch; 
    142 } 
    143  
    144120sub vcl_hash { 
    145121    set req.hash += req.url; 
     
    154130 
    155131sub vcl_fetch { 
    156  
    157  
    158132    /*  Do not store errors in cache, as maybe they will be corrected soon :-) */ 
    159     if (obj.status == 404 || obj.status == 500) { 
    160         pass; 
    161     } 
    162  
    163     /* dont cache unauthenticated errors stuff */ 
    164     if (obj.status == 503) { 
     133    if (obj.status == 404) { 
     134        pass; 
     135    } 
     136 
     137    /* dont cache  500 Internal Server Error; 501 Not Implemented; 502 Bad Gateway; 503 Service Unavailable; 504 Gateway Timeout */ 
     138    if (obj.status == 500 || obj.status ==  501 || obj.status == 502 || obj.status == 503 || obj.status == 504){ 
     139        pass; 
     140    } 
     141 
     142    /* dont cache auth errors */ 
     143    if (obj.status == 403) { 
    165144        pass; 
    166145    } 
  • setup.py

    r51 r52  
    77 
    88name='minitage.paste' 
    9 version = '0.0.1_alpha34' 
     9version = '0.0.1_alpha36' 
    1010 
    1111def read(rnames):