Page Caching Gets in the Way of Token Substitution
Issue with Drupal page caching preventing dynamic token values from being displayed correctly.
Recently, I wrote a module that exposes my own custom tokens. They worked well, up to a point. But when I tried to use them in the middle of the content of an article, they were not reflecting the latest value. That’s because of page caching. The page content is cached by Drupal, and the changing value of token is not reflected after the page gets cached.
I’ll look into this further, and I hope I find a solution.
Please add a comment below if you have any suggestions.