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.
Beans default to DRUPAL_CACHE_PER_ROLE caching. It would be handy to specify this per bean type, or per block. There may be another module out there that lets you do this on a per block basis, but I'm not aware of one and don't seem to be able to find it if it does exist. If not, this functionality may be better off in a separate module.
Comment | File | Size | Author |
---|---|---|---|
#6 | bean_type_cache-1216580-6.patch | 3.62 KB | alexweber |
#2 | bean_type_cache-1216580-2.patch | 3.66 KB | indytechcook |
Comments
Comment #1
mrfelton CreditAttribution: mrfelton commentedJust found this http://drupal.org/project/blockcache_alter. However it may still be good to allow people to specify the default type of caching for custom block types.
Comment #2
indytechcook CreditAttribution: indytechcook commentedCheckout this patch. It's pretty much untested
Comment #3
indytechcook CreditAttribution: indytechcook commentedClosing in favor of #1164056: Add module to override core block add
Comment #4
indytechcook CreditAttribution: indytechcook commentedI'm reopening this because it's a small step in the core block add replacement.
Comment #5
alexweber CreditAttribution: alexweber commentedPatch doesn't apply anymore against 7.x-1.x
Comment #6
alexweber CreditAttribution: alexweber commentedPatch re-rolled to apply cleanly on 7.x-1.x, not sure whether it works at all.
Comment #7
barraponto CreditAttribution: barraponto commentedCan't we provide an optional dependency on http://drupal.org/project/blockcache_alter ? Maybe we can integrate the interface, but I don't think we should reinvent the wheel (unless core blocks are the wheel).
Comment #8
indytechcook CreditAttribution: indytechcook commented@barraponto,
I do like the idea of not repeating ourselves. I took a look at blockcache_alter and it just does form_alters on the block configure form. There really isn't an API to hook into.
@alexweber, THanks!
Comment #9
alexweber CreditAttribution: alexweber commented@indytechcook np! :) The patch actually applies but doesn't work as advertised, it seems the original patch was a work in progress...