I am working on web site which is going to use a lot of nodequeues and the nodequeue creation will be very common operation. It also important to mention that the views module is enabled, too. Unfortunately I noticed the nodequeue_save function become pretty slow when the site has a lot of content.
The bottleneck is calling of views_invalidate_cache function which comes from views module and delete a menu, page and block cache together with the views cache.

I think that the only cache that should be deleted in this particular case is the views cache.
Opinions?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

boyan.borisov’s picture

Status: Active » Needs review
FileSize
1.16 KB

I am providing a patch which will add in the module its own function to take care to invalided the views cache.

boyan.borisov’s picture

Any comments?

fizk’s picture

Issue summary: View changes
FileSize
627 bytes

Maybe something like this, where the normal behaviour isn't changed, but developers can implement hook_nodequeue_save_invalidate_cache_alter($invalidate_callbacks) to remove "views_invalidate_cache" and prevent it from being called, and also add their own callbacks.

fizk’s picture

Issue tags: +Performance
fizk’s picture

jenlampton’s picture

Status: Needs review » Needs work

Looking good, but we'll need to add information about the new hook to the nodequeue.api.php file too.