Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mix
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
mix
Commits
3210ba77
Commit
3210ba77
authored
2 years ago
by
lugir
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3340796
by pierostz, Lugir: Twig cache auto-reload not working
parent
137378ec
No related branches found
Branches containing commit
Tags
1.1.1-rc1
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
mix.services.yml
+2
-1
2 additions, 1 deletion
mix.services.yml
src/Cache/NullBackendFactory.php
+22
-0
22 additions, 0 deletions
src/Cache/NullBackendFactory.php
src/MixServiceProvider.php
+3
-2
3 additions, 2 deletions
src/MixServiceProvider.php
with
27 additions
and
3 deletions
mix.services.yml
+
2
−
1
View file @
3210ba77
...
...
@@ -4,8 +4,9 @@ services:
arguments
:
[
'
@current_user'
]
tags
:
-
{
name
:
event_subscriber
}
mix.config_overrider
:
class
:
Drupal\mix\Config\ConfigOverride
tags
:
-
{
name
:
config.factory.override
,
priority
:
5
}
mix.cache.backend.null
:
class
:
Drupal\mix\Cache\NullBackendFactory
This diff is collapsed.
Click to expand it.
src/Cache/NullBackendFactory.php
0 → 100644
+
22
−
0
View file @
3210ba77
<?php
namespace
Drupal\mix\Cache
;
use
Drupal\Core\Cache\CacheFactoryInterface
;
use
Drupal\Core\Cache\NullBackend
;
class
NullBackendFactory
implements
CacheFactoryInterface
{
/**
* {@inheritdoc}
*/
public
function
get
(
$bin
)
{
return
new
NullBackend
(
$bin
);
}
/**
* Deletes all cache items in a bin.
*/
public
function
deleteAll
()
{}
}
This diff is collapsed.
Click to expand it.
src/MixServiceProvider.php
+
3
−
2
View file @
3210ba77
...
...
@@ -15,7 +15,7 @@ class MixServiceProvider extends ServiceProviderBase {
* {@inheritdoc}
*/
public
function
register
(
ContainerBuilder
$container
)
{
$container
->
register
(
'cache.render'
,
'Drupal\mix\Cache\NullBackendFactory'
);
}
/**
...
...
@@ -45,7 +45,8 @@ class MixServiceProvider extends ServiceProviderBase {
foreach
(
$ids
as
$id
)
{
if
(
$container
->
hasDefinition
(
$id
))
{
$definition
=
$container
->
getDefinition
(
$id
);
$definition
->
setClass
(
'Drupal\Core\Cache\NullBackendFactory'
);
$definition
->
setClass
(
'Drupal\mix\Cache\NullBackendFactory'
);
$definition
->
addTag
(
'cache.bin'
,
[
'default_backend'
=>
'mix.cache.backend.null'
]);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment