Hello, I have a problem with the caching system in modx (current version, PHP 7.4 …) and it seems I don’t understand it right.
- Start page with a list of dates for courses
- each course has a mark like “free places”, “fully booked”, “course is running” or “today”
- “running” and “today” are calculated by comparative calculation of first day and current date
- calling the site on a day with a “today” course doesn’t show the “today” mark
- my problem is probably the caching of page and/or snippets
Start page is cached. (I can put them uncached but I want an acceptable TTFB if possible.)
The template of the start page contains a pdoResources call uncached
The template of the pdoResource contains among other things this:
[[+termintag1:date=`%Y%m%d`:is=`[[getDate:date=`%Y%m%d`]]`:then=`<mark>Heute</mark>`]] [[+termintag1:date=`%Y%m%d`:lt=`[[getDate:date=`%Y%m%d`]]`:then=`<mark>Kurs läuft</mark>`]]
I need a hint what to do for a correct display of states on start page with every request. Yesterday I will see the “free places” (not shown in the code above), today I will see the “today” (Heute) and tomorrow there should be a “running” (Kurs läuft) mark.
Currently it doesn’t work, today I see free places and not the “today” mark.