文件操作 - vcl-example-manipulating-responses.rst.txt
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/doc/varnish/html/_sources/users-guide/vcl-example-manipulating-responses.rst.txt
编辑文件内容
.. Copyright (c) 2013-2017 Varnish Software AS SPDX-License-Identifier: BSD-2-Clause See LICENSE file for full text of license Altering the backend response ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here we override the TTL of a object coming from the backend if it matches certain criteria:: sub vcl_backend_response { if (bereq.url ~ "\.(png|gif|jpg)$") { unset beresp.http.set-cookie; set beresp.ttl = 1h; } } We also remove any Set-Cookie headers in order to avoid creation of a `hit-for-miss` object. See :ref:`vcl_actions`.
修改文件时间
将文件时间修改为当前时间的前一年
删除文件