Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
My drupal installation has this "structure":
- alias for nodes of type "canto" are like: archivio/canti/[node:title]
- on path archivio/canti I've a solr views with a list of "canto" nodes (so there paths like archivio/canti?page=X or archivio/canti?f[0]=my_field=value
I would like to add a Rule (or a custom module) that, when I save a node of type "canto" ask expire to purge all pages like "archivio/canti?*", but paths like "archivio/canti/*" should not be purged.
Which syntax should I use, from PHP, to obtain this result?
Thanks a lot for this great module.
Sergio
Comments
Comment #1
uzuri CreditAttribution: uzuri commentedI'm curious about this, too; I've got a paged news feed with a similar structure and if you just update the first page stories get lost in the cracks.
Comment #2
arrubiu CreditAttribution: arrubiu commentedI solvedin a "custom" way.
On a custom module, on hook_node_insert, update & delete, I call varnish function to purge pages based on regular expression, in this way (I use varnish):
?>
Attenction: this module does not call expire hooks.
Comment #3
SpleshkaGuys, what stops you from using hooks that are provided by expire module? See expire.api.php to get more info and examples.
Comment #4
SpleshkaCurrently for such custom needs you are free to implement hook_cache_expire() and add your custom logic there.