Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
cce09764
Commit
cce09764
authored
Nov 11, 2013
by
Jennifer Hodgdon
Browse files
Issue
#2112045
by Wim Leers, Berdir: Fix up documentation for cache tags
parent
3e5e3f46
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Component/Plugin/Discovery/CachedDiscoveryInterface.php
View file @
cce09764
...
...
@@ -14,6 +14,10 @@ interface CachedDiscoveryInterface extends DiscoveryInterface {
/**
* Clears static and persistent plugin definition caches.
*
* Don't resort to calling \Drupal::cache()->delete() and friends to make
* Drupal detect new or updated plugin definitions. Always use this method on
* the appropriate plugin type's plugin manager!
*/
public
function
clearCachedDefinitions
();
...
...
core/lib/Drupal/Core/Plugin/DefaultPluginManager.php
View file @
cce09764
...
...
@@ -121,8 +121,13 @@ public function __construct($subdir, \Traversable $namespaces, $plugin_definitio
* Cache key prefix to use, the language code will be appended
* automatically.
* @param array $cache_tags
* (optional) When providing a list of cache tags, the cached definitions
* are tagged and are used to clear the cache.
* (optional) When providing a list of cache tags, the cached plugin
* definitions are tagged with the provided cache tags. These cache tags can
* then be used to clear the corresponding cached plugin definitions. Note
* that this should be used with care! For clearing all cached plugin
* definitions of a plugin manager, call that plugin manager's
* clearCachedDefinitions() method. Only use cache tags when cached plugin
* definitions should be cleared along with other, related cache entries.
*/
public
function
setCacheBackend
(
CacheBackendInterface
$cache_backend
,
LanguageManager
$language_manager
,
$cache_key_prefix
,
array
$cache_tags
=
array
())
{
$this
->
languageManager
=
$language_manager
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment