Downloads
Download tar.gz
8.52 KB
MD5: 27c6d2beec8d751f9f2a594d05ec015d
SHA-1: 3018949b06d368243ddd8aeed15819e07b92d492
SHA-256: 5b09e2ac57098a9d303441a9390e455687cdec46add71c4c86b09d7b7874c427
Download zip
9.17 KB
MD5: e97131804a2e1978c4f4fbd7092e4a38
SHA-1: b217740286ba18e15d4625ea29ab9aebabb17436
SHA-256: 8d7846ae8ef13bc454e8c7c478bcf0fca87f42a762cd307de08870accad2c4ee
Release notes
First release!
Enabling this module provides you with 3 new keys that you can define for your menu items in hook_menu:
- cache
-
One of the 3 following values (similar to the block module):
MENU_CALLBACK_CACHE_GLOBAL - Cache this menu callback globally for all users.
MENU_CALLBACK_CACHE_PER_ROLE - Cache this menu callback per user role.
MENU_CALLBACK_CACHE_PER_USER - Cache this menu callback per user.
- cache max age (optional)
-
How long to keep the item in the cache before it becomes invalidated. If not specified, the default of 5 minutes is used.
- cache key callback (optional)
-
A callback that will generate the key to use for the cached callback. This is useful as it lets you define the key in a way that you can force invalidation early if you want to. You can also throw a DoNotCacheException within the callback to prevent the menu callback from caching. The cache key callback takes the exact same parameters as the menu item's page callback. If no cache key callback is specified, the cache key is automatically generated by using the page callback and hashing its parameters.