0

With a few years of Drupal 6 and 7 experience, I've happily made my first Drupal 8 installation. In my previous installations of Drupal I've used custom made PHP code that does a lookup in a personal database. I still need this in Drupal 8.

I've managed to install the PHP filter, and scripts are executed fine, but the page becomes cached, and changes in my database are not seen before I edit the page or empty the cache manually. Inconvenient, to say the least.

According to documentation, PHP filtered pages will not be cached, but evidently my page is.

Any suggestions?

2

PHP filter is an unrecommended module and you should not use it. It not a secure option and the site maintenance is too difficult.

My recommendation is avoid this module and implements a dummy module with this functionality.

If you decide to use in any case, as you told correctly this pages should not been cached but it depends of your cache config and the place where the php-text is located. I mean, you can use the php filter text in a view or in a block (for example) and the cache behavior will be different.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.