Caching
Last updated on
11 April 2017
Since Package states are different for each user, any functionality or rendered elements that your Package provides should use caching with the user context.
For example:
$build['#cache'] = [
'contexts' => [
'user',
],
];
Whenever the Packages form or a Package settings form is submitted, the cache for the user will be invalidated.
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion