I described a custom views filter plugin extending InOperator. The aim is to offer a select list where the user can choose from a list of fractions of a legislature. Legislature and fractions are custom entity types, the fraction entity references to the legislature just for background explanation. Views offers automatically an exposed filter but here the user can select from all fractions in system. When we - for example - list all mandates of a legislature with views we now want to have this filter just offering the fraction of the legisature.

This is working nice so far. Except for caching: when caching is activated and I change the name of a fraction this change does not effect the options list.

I tried to override the getCacheTags method defined in FilterPluginBase class but this method never gets called. How can I tell Drupal to remove the caching of the exposed filter when a fraction included in the option list was updated?

Your Answer

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

Browse other questions tagged or ask your own question.