Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
3a5e9974
Commit
3a5e9974
authored
Mar 31, 2014
by
Nathaniel Catchpole
Browse files
Issue
#2221065
by damiankloip, Wim Leers, Berdir: Rename default 'cache' cache bin to 'default'.
parent
be94d4e0
Changes
25
Hide whitespace changes
Inline
Side-by-side
core/core.services.yml
View file @
3a5e9974
...
...
@@ -39,13 +39,13 @@ services:
factory_method
:
get
factory_service
:
cache_factory
arguments
:
[
config
]
cache.
cache
:
cache.
default
:
class
:
Drupal\Core\Cache\CacheBackendInterface
tags
:
-
{
name
:
cache.bin
}
factory_method
:
get
factory_service
:
cache_factory
arguments
:
[
cache
]
arguments
:
[
default
]
cache.entity
:
class
:
Drupal\Core\Cache\CacheBackendInterface
tags
:
...
...
@@ -146,7 +146,7 @@ services:
class
:
Drupal\Core\Path\AliasWhitelist
tags
:
-
{
name
:
needs_destruction
}
arguments
:
[
path_alias_whitelist
,
'
@cache.
cache
'
,
'
@lock'
,
'
@state'
,
'
@database'
]
arguments
:
[
path_alias_whitelist
,
'
@cache.
default
'
,
'
@lock'
,
'
@state'
,
'
@database'
]
path.alias_manager
:
class
:
Drupal\Core\Path\AliasManager
arguments
:
[
'
@path.crud'
,
'
@path.alias_whitelist'
,
'
@language_manager'
]
...
...
@@ -178,16 +178,16 @@ services:
-
{
name
:
persist
}
default_plugin_manager
:
abstract
:
true
arguments
:
[
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
]
arguments
:
[
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
]
module_handler
:
class
:
Drupal\Core\Extension\CachedModuleHandler
arguments
:
[
'
%container.modules%'
,
'
@state'
,
'
@cache.bootstrap'
]
theme_handler
:
class
:
Drupal\Core\Extension\ThemeHandler
arguments
:
[
'
@config.factory'
,
'
@module_handler'
,
'
@cache.
cache
'
,
'
@info_parser'
,
'
@config.installer'
,
'
@router.builder'
]
arguments
:
[
'
@config.factory'
,
'
@module_handler'
,
'
@cache.
default
'
,
'
@info_parser'
,
'
@config.installer'
,
'
@router.builder'
]
entity.manager
:
class
:
Drupal\Core\Entity\EntityManager
arguments
:
[
'
@container.namespaces'
,
'
@service_container'
,
'
@module_handler'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@string_translation'
]
arguments
:
[
'
@container.namespaces'
,
'
@service_container'
,
'
@module_handler'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@string_translation'
]
tags
:
-
{
name
:
plugin_manager_cache_clear
}
entity.form_builder
:
...
...
@@ -195,13 +195,13 @@ services:
arguments
:
[
'
@entity.manager'
,
'
@form_builder'
]
plugin.manager.field.field_type
:
class
:
Drupal\Core\Field\FieldTypePluginManager
arguments
:
[
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
]
arguments
:
[
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
]
plugin.manager.field.widget
:
class
:
Drupal\Core\Field\WidgetPluginManager
arguments
:
[
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@module_handler'
,
'
@language_manager'
,
'
@plugin.manager.field.field_type'
]
arguments
:
[
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@module_handler'
,
'
@language_manager'
,
'
@plugin.manager.field.field_type'
]
plugin.manager.field.formatter
:
class
:
Drupal\Core\Field\FormatterPluginManager
arguments
:
[
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@module_handler'
,
'
@language_manager'
,
'
@plugin.manager.field.field_type'
]
arguments
:
[
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@module_handler'
,
'
@language_manager'
,
'
@plugin.manager.field.field_type'
]
plugin.manager.archiver
:
class
:
Drupal\Core\Archiver\ArchiverManager
parent
:
default_plugin_manager
...
...
@@ -210,13 +210,13 @@ services:
arguments
:
[
'
@container.namespaces'
]
plugin.manager.menu.local_action
:
class
:
Drupal\Core\Menu\LocalActionManager
arguments
:
[
'
@controller_resolver'
,
'
@request'
,
'
@router.route_provider'
,
'
@module_handler'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@access_manager'
,
'
@current_user'
]
arguments
:
[
'
@controller_resolver'
,
'
@request'
,
'
@router.route_provider'
,
'
@module_handler'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@access_manager'
,
'
@current_user'
]
plugin.manager.menu.local_task
:
class
:
Drupal\Core\Menu\LocalTaskManager
arguments
:
[
'
@controller_resolver'
,
'
@request'
,
'
@router.route_provider'
,
'
@router.builder'
,
'
@module_handler'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@access_manager'
,
'
@current_user'
]
arguments
:
[
'
@controller_resolver'
,
'
@request'
,
'
@router.route_provider'
,
'
@router.builder'
,
'
@module_handler'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@access_manager'
,
'
@current_user'
]
plugin.manager.menu.contextual_link
:
class
:
Drupal\Core\Menu\ContextualLinkManager
arguments
:
[
'
@controller_resolver'
,
'
@module_handler'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@access_manager'
,
'
@current_user'
,
'
@request_stack'
]
arguments
:
[
'
@controller_resolver'
,
'
@module_handler'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@access_manager'
,
'
@current_user'
,
'
@request_stack'
]
plugin.cache_clearer
:
class
:
Drupal\Core\Plugin\CachedDiscoveryClearer
request
:
...
...
@@ -604,7 +604,7 @@ services:
arguments
:
[
'
@database'
,
'
@request'
]
plugin.manager.mail
:
class
:
Drupal\Core\Mail\MailManager
arguments
:
[
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
,
'
@config.factory'
]
arguments
:
[
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
,
'
@config.factory'
]
plugin.manager.condition
:
class
:
Drupal\Core\Condition\ConditionManager
parent
:
default_plugin_manager
...
...
@@ -620,7 +620,7 @@ services:
-
{
name
:
event_subscriber
}
image.toolkit.manager
:
class
:
Drupal\Core\ImageToolkit\ImageToolkitManager
arguments
:
[
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@config.factory'
,
'
@module_handler'
]
arguments
:
[
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@config.factory'
,
'
@module_handler'
]
image.factory
:
class
:
Drupal\Core\Image\ImageFactory
arguments
:
[
'
@image.toolkit.manager'
]
...
...
@@ -699,7 +699,7 @@ services:
class
:
Zend\Feed\Writer\Extension\WellFormedWeb\Renderer\Entry
theme.registry
:
class
:
Drupal\Core\Theme\Registry
arguments
:
[
'
@cache.
cache
'
,
'
@lock'
,
'
@module_handler'
]
arguments
:
[
'
@cache.
default
'
,
'
@lock'
,
'
@module_handler'
]
tags
:
-
{
name
:
needs_destruction
}
authentication
:
...
...
@@ -742,6 +742,6 @@ services:
class
:
Drupal\Core\Asset\AssetDumper
library.discovery
:
class
:
Drupal\Core\Asset\LibraryDiscovery
arguments
:
[
'
@cache.
cache
'
,
'
@module_handler'
]
arguments
:
[
'
@cache.
default
'
,
'
@module_handler'
]
info_parser
:
class
:
Drupal\Core\Extension\InfoParser
core/includes/common.inc
View file @
3a5e9974
...
...
@@ -3480,7 +3480,8 @@ function drupal_render_page($page) {
* required. If 'cid' is set, 'keys' is ignored. Use only if you have
* special requirements.
* - 'expire': Set to one of the cache lifetime constants.
* - 'bin': Specify a cache bin to cache the element in. Default is 'cache'.
* - 'bin': Specify a cache bin to cache the element in. Default is
* 'default'.
* - If this element has #type defined and the default attributes for this
* element have not already been merged in (#defaults_loaded = TRUE) then
* the defaults for this type of element, defined in hook_element_info(),
...
...
@@ -4429,7 +4430,7 @@ function watchdog_severity_levels() {
* - Clears all persistent caches:
* - The bootstrap cache bin containing base system, module system, and theme
* system information.
* - The common '
cache
' cache bin containing arbitrary caches.
* - The common '
default
' cache bin containing arbitrary caches.
* - The page cache.
* - The URL alias path cache.
* - Resets all static variables that have been defined via drupal_static().
...
...
core/lib/Drupal.php
View file @
3a5e9974
...
...
@@ -221,14 +221,14 @@ public static function database() {
*
* @param string $bin
* (optional) The cache bin for which the cache object should be returned,
* defaults to '
cache
'.
* defaults to '
default
'.
*
* @return \Drupal\Core\Cache\CacheBackendInterface
* The cache object associated with the specified bin.
*
* @ingroup cache
*/
public
static
function
cache
(
$bin
=
'
cache
'
)
{
public
static
function
cache
(
$bin
=
'
default
'
)
{
return
static
::
$container
->
get
(
'cache.'
.
$bin
);
}
...
...
core/lib/Drupal/Core/Cache/CacheFactory.php
View file @
3a5e9974
...
...
@@ -50,7 +50,7 @@ function __construct(Settings $settings) {
*/
public
function
get
(
$bin
)
{
$cache_settings
=
$this
->
settings
->
get
(
'cache'
);
if
(
isset
(
$cache_settings
[
$bin
]))
{
if
(
isset
(
$cache_settings
[
'bins'
][
$bin
]))
{
$service_name
=
$cache_settings
[
$bin
];
}
elseif
(
isset
(
$cache_settings
[
'default'
]))
{
...
...
core/lib/Drupal/Core/Cache/DatabaseBackend.php
View file @
3a5e9974
...
...
@@ -42,11 +42,9 @@ class DatabaseBackend implements CacheBackendInterface {
* The cache bin for which the object is created.
*/
public
function
__construct
(
Connection
$connection
,
$bin
)
{
// All cache tables should be prefixed with 'cache_', except for the
// default 'cache' bin.
if
(
$bin
!=
'cache'
)
{
$bin
=
'cache_'
.
$bin
;
}
// All cache tables should be prefixed with 'cache_'.
$bin
=
'cache_'
.
$bin
;
$this
->
bin
=
$bin
;
$this
->
connection
=
$connection
;
}
...
...
core/lib/Drupal/Core/Controller/ControllerBase.php
View file @
3a5e9974
...
...
@@ -147,12 +147,12 @@ protected function entityFormBuilder() {
*
* @param string $bin
* (optional) The cache bin for which the cache object should be returned,
* defaults to '
cache
'.
* defaults to '
default
'.
*
* @return \Drupal\Core\Cache\CacheBackendInterface
* The cache object associated with the specified bin.
*/
protected
function
cache
(
$bin
=
'
cache
'
)
{
protected
function
cache
(
$bin
=
'
default
'
)
{
return
$this
->
container
()
->
get
(
'cache.'
.
$bin
);
}
...
...
core/lib/Drupal/Core/DependencyInjection/UpdateServiceProvider.php
View file @
3a5e9974
...
...
@@ -43,7 +43,7 @@ public function register(ContainerBuilder $container) {
$container
->
register
(
'theme_handler'
,
'Drupal\Core\Extension\ThemeHandler'
)
->
addArgument
(
new
Reference
(
'config.factory'
))
->
addArgument
(
new
Reference
(
'module_handler'
))
->
addArgument
(
new
Reference
(
'cache.
cache
'
))
->
addArgument
(
new
Reference
(
'cache.
default
'
))
->
addArgument
(
new
Reference
(
'info_parser'
));
}
}
...
...
core/lib/Drupal/Core/Entity/EntityManager.php
View file @
3a5e9974
...
...
@@ -157,7 +157,7 @@ public function __construct(\Traversable $namespaces, ContainerInterface $contai
$this
->
discovery
=
new
AnnotatedClassDiscovery
(
'Entity'
,
$namespaces
,
'Drupal\Core\Entity\Annotation\EntityType'
);
$this
->
discovery
=
new
InfoHookDecorator
(
$this
->
discovery
,
'entity_type_build'
);
$this
->
discovery
=
new
AlterDecorator
(
$this
->
discovery
,
'entity_type'
);
$this
->
discovery
=
new
CacheDecorator
(
$this
->
discovery
,
'entity_type:'
.
$this
->
languageManager
->
getCurrentLanguage
()
->
id
,
'
cache
'
,
Cache
::
PERMANENT
,
array
(
'entity_types'
=>
TRUE
));
$this
->
discovery
=
new
CacheDecorator
(
$this
->
discovery
,
'entity_type:'
.
$this
->
languageManager
->
getCurrentLanguage
()
->
id
,
'
default
'
,
Cache
::
PERMANENT
,
array
(
'entity_types'
=>
TRUE
));
$this
->
container
=
$container
;
}
...
...
core/lib/Drupal/Core/Plugin/Discovery/CacheDecorator.php
View file @
3a5e9974
...
...
@@ -75,7 +75,7 @@ class CacheDecorator implements CachedDiscoveryInterface {
* @param array $cache_tags
* The cache tags associated with the definition list.
*/
public
function
__construct
(
DiscoveryInterface
$decorated
,
$cache_key
,
$cache_bin
=
'
cache
'
,
$cache_expire
=
Cache
::
PERMANENT
,
array
$cache_tags
=
array
())
{
public
function
__construct
(
DiscoveryInterface
$decorated
,
$cache_key
,
$cache_bin
=
'
default
'
,
$cache_expire
=
Cache
::
PERMANENT
,
array
$cache_tags
=
array
())
{
$this
->
decorated
=
$decorated
;
$this
->
cacheKey
=
$cache_key
;
$this
->
cacheBin
=
$cache_bin
;
...
...
core/modules/aggregator/aggregator.services.yml
View file @
3a5e9974
services
:
plugin.manager.aggregator.fetcher
:
class
:
Drupal\aggregator\Plugin\AggregatorPluginManager
arguments
:
[
fetcher
,
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
]
arguments
:
[
fetcher
,
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
]
plugin.manager.aggregator.parser
:
class
:
Drupal\aggregator\Plugin\AggregatorPluginManager
arguments
:
[
parser
,
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
]
arguments
:
[
parser
,
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
]
plugin.manager.aggregator.processor
:
class
:
Drupal\aggregator\Plugin\AggregatorPluginManager
arguments
:
[
processor
,
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
]
arguments
:
[
processor
,
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
]
aggregator.items.importer
:
class
:
Drupal\aggregator\ItemsImporter
arguments
:
[
'
@config.factory'
,
'
@plugin.manager.aggregator.fetcher'
,
'
@plugin.manager.aggregator.parser'
,
'
@plugin.manager.aggregator.processor'
]
core/modules/block/block.services.yml
View file @
3a5e9974
services
:
plugin.manager.block
:
class
:
Drupal\block\Plugin\Type\BlockManager
arguments
:
[
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
,
'
@string_translation'
]
arguments
:
[
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
,
'
@string_translation'
]
theme.negotiator.block.admin_demo
:
class
:
Drupal\block\Theme\AdminDemoNegotiator
tags
:
...
...
core/modules/config_translation/config_translation.services.yml
View file @
3a5e9974
...
...
@@ -20,7 +20,7 @@ services:
plugin.manager.config_translation.mapper
:
class
:
Drupal\config_translation\ConfigMapperManager
arguments
:
-
'
@cache.
cache
'
-
'
@cache.
default
'
-
'
@language_manager'
-
'
@module_handler'
-
'
@config.typed'
...
...
core/modules/field/field.services.yml
View file @
3a5e9974
services
:
field.info
:
class
:
Drupal\field\FieldInfo
arguments
:
[
'
@cache.
cache
'
,
'
@config.factory'
,
'
@module_handler'
,
'
@plugin.manager.field.field_type'
,
'
@language_manager'
]
arguments
:
[
'
@cache.
default
'
,
'
@config.factory'
,
'
@module_handler'
,
'
@plugin.manager.field.field_type'
,
'
@language_manager'
]
core/modules/hal/lib/Drupal/hal/Tests/NormalizerTestBase.php
View file @
3a5e9974
...
...
@@ -122,7 +122,7 @@ function setUp() {
'bundle'
=>
'entity_test'
,
))
->
save
();
$link_manager
=
new
LinkManager
(
new
TypeLinkManager
(
new
MemoryBackend
(
'
cache
'
)),
new
RelationLinkManager
(
new
MemoryBackend
(
'
cache
'
),
\
Drupal
::
entityManager
()));
$link_manager
=
new
LinkManager
(
new
TypeLinkManager
(
new
MemoryBackend
(
'
default
'
)),
new
RelationLinkManager
(
new
MemoryBackend
(
'
default
'
),
\
Drupal
::
entityManager
()));
$chain_resolver
=
new
ChainEntityResolver
(
array
(
new
UuidResolver
(),
new
TargetIdResolver
()));
...
...
core/modules/language/language.services.yml
View file @
3a5e9974
services
:
plugin.manager.language_negotiation_method
:
class
:
Drupal\language\LanguageNegotiationMethodManager
arguments
:
[
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@module_handler'
]
arguments
:
[
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@module_handler'
]
language_negotiator
:
class
:
Drupal\language\LanguageNegotiator
arguments
:
[
'
@language_manager'
,
'
@plugin.manager.language_negotiation_method'
,
'
@config.factory'
,
'
@settings'
]
...
...
core/modules/locale/locale.services.yml
View file @
3a5e9974
...
...
@@ -12,7 +12,7 @@ services:
arguments
:
[
'
@database'
]
string_translator.locale.lookup
:
class
:
Drupal\locale\LocaleTranslation
arguments
:
[
'
@locale.storage'
,
'
@cache.
cache
'
,
'
@lock'
,
'
@config.factory'
,
'
@language_manager'
]
arguments
:
[
'
@locale.storage'
,
'
@cache.
default
'
,
'
@lock'
,
'
@config.factory'
,
'
@language_manager'
]
tags
:
-
{
name
:
string_translator
}
-
{
name
:
needs_destruction
}
core/modules/migrate/migrate.services.yml
View file @
3a5e9974
...
...
@@ -8,19 +8,19 @@ services:
arguments
:
[
migrate
]
plugin.manager.migrate.source
:
class
:
Drupal\migrate\Plugin\MigratePluginManager
arguments
:
[
source
,
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
,
'
Drupal\migrate\Annotation\MigrateSource'
]
arguments
:
[
source
,
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
,
'
Drupal\migrate\Annotation\MigrateSource'
]
plugin.manager.migrate.process
:
class
:
Drupal\migrate\Plugin\MigratePluginManager
arguments
:
[
process
,
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
,
'
Drupal\migrate\Annotation\MigrateProcessPlugin'
]
arguments
:
[
process
,
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
,
'
Drupal\migrate\Annotation\MigrateProcessPlugin'
]
plugin.manager.migrate.destination
:
class
:
Drupal\migrate\Plugin\MigrateDestinationPluginManager
arguments
:
[
destination
,
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
,
'
@entity.manager'
]
arguments
:
[
destination
,
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
,
'
@entity.manager'
]
plugin.manager.migrate.id_map
:
class
:
Drupal\migrate\Plugin\MigratePluginManager
arguments
:
[
id_map
,
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
]
arguments
:
[
id_map
,
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
]
plugin.manager.migrate.entity_field
:
class
:
Drupal\migrate\Plugin\MigratePluginManager
arguments
:
[
entity_field
,
'
@container.namespaces'
,
'
@cache.
cache
'
,
'
@language_manager'
,
'
@module_handler'
]
arguments
:
[
entity_field
,
'
@container.namespaces'
,
'
@cache.
default
'
,
'
@language_manager'
,
'
@module_handler'
]
password_migrate
:
class
:
Drupal\migrate\MigratePassword
arguments
:
[
'
@password_original'
]
core/modules/migrate_drupal/migrate_drupal.services.yml
View file @
3a5e9974
services
:
plugin.manager.migrate.load
:
class
:
Drupal\migrate\Plugin\MigratePluginManager
arguments
:
[
load
,
'
@container.namespaces'
,
'
@cache.cache'
,
'
@language_manager'
,
'
@module_handler'
]
\ No newline at end of file
arguments
:
[
load
,
'
@container.namespaces'
,
'
@cache.default'
,
'
@language_manager'
,
'
@module_handler'
]
core/modules/rest/rest.services.yml
View file @
3a5e9974
...
...
@@ -18,7 +18,7 @@ services:
arguments
:
[
'
@rest.link_manager.type'
,
'
@rest.link_manager.relation'
]
rest.link_manager.type
:
class
:
Drupal\rest\LinkManager\TypeLinkManager
arguments
:
[
'
@cache.
cache
'
]
arguments
:
[
'
@cache.
default
'
]
rest.link_manager.relation
:
class
:
Drupal\rest\LinkManager\RelationLinkManager
arguments
:
[
'
@cache.
cache
'
,
'
@entity.manager'
]
arguments
:
[
'
@cache.
default
'
,
'
@entity.manager'
]
core/modules/system/core.api.php
View file @
3a5e9974
...
...
@@ -226,8 +226,8 @@
*
* When you request a cache object, you can specify the bin name in your call to
* \Drupal::cache(). Alternatively, you can request a bin by getting service
* "cache.nameofbin" from the container. The default bin is called "
cache
", with
* service name "cache.
cache
", it is used to store common and frequently used
* "cache.nameofbin" from the container. The default bin is called "
default
", with
* service name "cache.
default
", it is used to store common and frequently used
* caches like plugin information.
*
* Other common cache bins are the following:
...
...
@@ -310,18 +310,18 @@
* though so that all cached data, or that of an individual cache bin, uses a
* different cache backend, such as APC or Memcache, for storage.
*
* In a settings.php file, you can override the
class
used for a particular
* cache bin. For example, if your implementation of
* \Drupal\Core\Cache\CacheBackendInterface was called
MyCustomCache
, the
* In a settings.php file, you can override the
service
used for a particular
* cache bin. For example, if your
service
implementation of
* \Drupal\Core\Cache\CacheBackendInterface was called
cache.custom
, the
* following line would make Drupal use it for the 'cache_render' bin:
* @code
* $settings['cache
_classes']['cache_render'] = 'Drupal\full\namespace\to\MyCustomCache
';
* $settings['cache
']['bins']['render'] = 'cache.custom
';
* @endcode
*
* Additionally, you can register your cache implementation to be used by
* default for all cache bins with:
* @code
* $settings['cache
_classes']['cache'] = 'Drupal\full\namespace\to\MyCustomCache
';
* $settings['cache
']['default'] = 'cache.custom
';
* @endcode
*
* @see https://drupal.org/node/1884796
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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