문제

In Varnish there are some differences between VCL 2.x and 3.0. Hash generation for example. In Varnish 2.x you'd do req.hash += somevar while in Varnish 3.x you would call hash_data(somevar).

Is it possible to write portable Varnish scripts that work on both 2.x and 3.x? Can I if on the Varnish version for example?

도움이 되었습니까?

해결책

No, it's not possible since Varnish compile vcl configs in C prior to start, so you should translate the config to the right version before or you will get a compile error.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top