I should have reopened #2884218: Results are cached but I could not. If we look at the code:
* cache = FALSE
then
public function process($text, $langcode) {
return new FilterProcessResult(php_eval($text));
}
However, the "cache" attribute was removed in 2014 (in the commit https://cgit.drupalcode.org/drupal/commit/?id=d5be5c0 that added FilterProcessResult). We should do something like this:
public function process($text, $langcode) {
$result = new FilterProcessResult(php_eval($text));
$result->setCacheMaxAge(0);
return $result;
}
I'm not posting a patch now because I don't use this module, but custom one with similar issue. We can also add tests.
Comments
Comment #2
hass commentedThanks for sharing this details.
Comment #3
jcisio commentedLet's see if it fails.
Comment #4
hass commentedAnd now with your bugfix?
Comment #6
hass commentedBranch is green... this would be the last patch before creating final 1.0. Would be great to get in ASAP.
Comment #7
hass commentedComment #8
hass commentedRe-uploding the test-only that had a bug.
Comment #12
hass commentedThanks for your help. Seems to work based on tests.
Comment #13
jcisio commentedYes I didn't have time to test that test-only patch. Thank you for figuring out the backslash bug, and for the commit!