<commit_before>.. _whatsnew_upgrading_5.1:

%%%%%%%%%%%%%%%%%%%%%%%%
Upgrading to Varnish 5.1
%%%%%%%%%%%%%%%%%%%%%%%%

Changes to VCL
==============

vcl_backend_response
~~~~~~~~~~~~~~~~~~~~

* Added ``return(pass(DURATION))`` to set an object to hit-for-pass,
  see :ref:`whatsnew_changes_5.1_hitpass`.
<commit_msg>Document changes to varnishlog and varnishstat regarding hit-for-miss/-pass in What's New for 5.1.<commit_after>.. _whatsnew_upgrading_5.1:

%%%%%%%%%%%%%%%%%%%%%%%%
Upgrading to Varnish 5.1
%%%%%%%%%%%%%%%%%%%%%%%%

Changes to VCL
==============

vcl_backend_response
~~~~~~~~~~~~~~~~~~~~

* Added ``return(pass(DURATION))`` to set an object to hit-for-pass,
  see :ref:`whatsnew_changes_5.1_hitpass`.

Other changes
=============

* Added the ``cache_hitmiss`` stat to ``varnishstat(1)`` to count hits on
  hit-for-miss objects.

* The ``cache_hitpass`` stat now only counts hits on hit-for-pass objects.

* An entry with the ``TTL`` tag and the prefix ``HFP`` is logged in
  ``varnishlog(1)`` to record the duration set for hit-for-pass objects.

{'fraction_non_alphanumeric': 0.25866916588566075, 'fraction_numerical': 0.01499531396438613, 'mean_word_length': 5.512195121951219, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3001039', 'n_tokens_mistral': 363, 'n_tokens_neox': 343, 'n_words': 98}