Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub vcl_hash {
- hash_data(req.url);
- // Summarize images01, images02 ...
- if (req.http.host) {
- hash_data(regsub(req.http.host, "^images\d\d\.", "images"));
- } else {
- hash_data(server.ip);
- }
- // Separate cache for ajax requests
- if (req.http.X-Requested-With) {
- hash_data(req.http.X-Requested-With);
- }
- // Per-user frontend caching (do not make separate copies of css/js)
- if (req.http.host && req.http.host ~ "^(www\.)?oursite\.(at|com)" && req.url !~ "^/(css|js|images|fonts)/") {
- if (req.http.Cookie ~ "SESSID") {
- hash_data(regsub(req.http.Cookie, "^.*?SESSID=([^;]*).*$", "\1"));
- }
- }
- return (lookup);
- }
Add Comment
Please, Sign In to add comment