How does the Craft CMS cache work? I want to show a certain message if the server date is between x and y. Can I do this by using an Twig if/else statement or is this cached?
My code is like this:
{% set now = "now"|date("U") %}
{% set tournamentDates = [
1536323400,
1536409800,
1536971400,
1537650000,
1537736400
]
%}
{% for tournamentTime in tournamentDates %}
<!-- {{ tournamentTime|date("d-m-y H:i:s")}} -->
{% if ( now > tournamentTime ) and ( now < tournamentTime + 43200 ) %}
TOURNAMENT IS LIVE
{% endif %}
{% endfor %}