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: