In my project there are some frontend outputs depending on the current day and daytime. For example when a user comes to the page on a Saturday I would like to show him a message “Our office will be open on Monday again”.
So far so working – but for testing and presentation purposes I would like to show the text to testers and customers even when today is Monday by adding an URL parameter like “?testme=saturday”.
What I do not get: how can I tell Drupal to avoid caching when this parameter is set? Doing it on preprocess functions or the build render array functions is too late – these functions may not be reached as the block, page or whatever may already be cached. I think I need something very early in page building process to achieve that?!