Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Is there any reason that facetapi blocks can't have an option to be cached globally? I've got a lot of facets, and caching them on a per-role basis clogs up the block cache. Each block is identical for every user on my site, so I don't need them to be cached per role.
Screenshot: http://i.imgur.com/k27Zs.png
Comment | File | Size | Author |
---|---|---|---|
#3 | 1814078-facetapi-block-cache-options.patch | 869 bytes | cafuego |
Comments
Comment #1
cpliakas CreditAttribution: cpliakas commentedThe reason is access control, where Facet API doesn't have any concept of whether the user has access to the resource. If you have node access enabled and global caching, restricted content could be displayed to unprivileged users. However, I would be in favor of allowing for a global cache setting given that it displays a loud warning saying that a potentially insecure setting is active if node access is being leveraged as well.
Comment #2
JordanMagnuson CreditAttribution: JordanMagnuson commentedI agree that a warning message would be good, but I do think it should be an allowed option.
Comment #3
cafuego CreditAttribution: cafuego commentedAttached patch adds 'Global' and 'Per page' cache options and relabels the existing cache options more appropriately, since they are each a combination of two cache options.
It does not add the suggested warning!
Comment #4
cpliakas CreditAttribution: cpliakas commentedThanks for the contribution!
Before adding this we really need to add some sort of warning, because adding an option that effectively bypasses access control is a scary thing to me.
I do like the additional clarification of the "Per role per search page" and would commit that without further discussion.
Chris
Comment #5
JordanMagnuson CreditAttribution: JordanMagnuson commentedIsn't the content access issue handled by Drupal core? I've enabled modules that define content access restrictions, and as a consequence, I can't enable ANY amount of caching for this, or any other block.
Screenshots:
http://imagizer.imageshack.com/img537/2523/b3f251.png
http://imagizer.imageshack.com/img539/3704/2b5434.png
Doesn't that take care of any warning needs?