On every page load the _homebox_can_view_block function gets called.
Access permissions for blocks don't change frequently.
Roles of the users can.
We were trying to improve performance on our site and so we cached this setting.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | homebox_can_view_block-caching-1261358-2.patch | 1.29 KB | gitesh.koli |
| #1 | homebox_can_view_block-caching-1261358-1.patch | 1.26 KB | gitesh.koli |
Comments
Comment #1
gitesh.koli commentedPatch for this fix.
Comment #2
gitesh.koli commentedUpdated patch. removed the error with the usage of asort
Comment #3
brianV commentedmoving to 'needs review'
Comment #4
attiks commentedPatch is working saving 200-300ms, good work
Comment #5
attiks commentedComment #6
Matt-H commentedA D7 version of this patch can be found at http://drupal.org/node/1372368.
Comment #7
roderikIf you already cache things inside _homebox_can_view_block(), then why would you need to cache the return values of _homebox_can_view_block() too? See #1213154: Cache query results to improve performance