我有一个请求: http://www.example.com/app?test=1 . 希望当有 test=1 这个请求参数的时候缓存这这个url. 请问 nginx 能做到么?。
我在配置文件中写
service {
location /app {
if ( $arg_test ) {
//nginx 的 cache 的配置
}
}
}
但是 启动的时候报错。告诉我 cache 不能配置在 if 块中。。。
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
ringa_lee