After updating the node_access table by calling node_access_acquire_grants, this module also calls cache_clear_all();. On large sites, this causes an enormous performance hit. In my opinion, the cache should not be cleared.

I understand that some users expect to have caching, and yet see their changes immediately. Maybe this should be made optional?

If a cache clear must still happen, a more elegant approach might be to clear only the page cache, or target the cache_page table to remove only those URIs that refer to the updated nodes. But I don't think Flexi Access should concern itself with caching. That's better handled with other modules.

CommentFileSizeAuthor
#2 flexiaccess-smart-cache.patch3.68 KBrudolfbyker
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fmr created an issue. See original summary.

rudolfbyker’s picture

Here is my suggestion. I did not use the cache_clear function, but rather just remove very specific records from the cache_page table using db_delete directly, because cache_clear does nothing if the minimum page cache time has not elapsed.

This has immediate effect with almost zero impact on site performance.

I did not thoroughly test this yet.

rudolfbyker’s picture

Status: Active » Needs review

It seems to work fine on my side.

gisle’s picture

We need to also have reviews from community members using this module.