[issue 3419681] move caching to the hook_rebuild
3 unresolved threads
3 unresolved threads
Closes #3419681
Merge request reports
Activity
added 1 commit
- df77c56c - [issue 3419681] move caching to the hook_rebuild
added 1 commit
- b4d0173f - [issue 3419681] move caching to the hook_rebuild
129 128 $sources[$type] = array_unique($sources[$type]); 130 129 } 131 130 132 $this->cache->set($cid, $sources, Cache::PERMANENT, [ 133 'library_info', 134 'config:core.extension', 135 ]); 136 4 4 * @file 5 5 * CSP module hooks. 6 6 */ 7 8 use Drupal\Core\Cache\Cache; 9 10 /** 11 * Implements hook_rebuild(). 12 */ 13 function csp_rebuild() { 14 $sources = \Drupal::service('csp.library_policy_builder')->getSources(); 15 16 \Drupal::service('cache.default')->set('csp:sources', $sources, Cache::PERMANENT, [ 17 'library_info', 18 'config:core.extension', 19 ]);
Please register or sign in to reply