Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
cache_register-3183611
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Issue forks
cache_register-3183611
Commits
7712aad1
Commit
7712aad1
authored
Nov 18, 2020
by
mrweiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not keep track of slots on drawer
parent
fb0a1f97
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
40 deletions
+3
-40
cache_register.services.yml
cache_register.services.yml
+1
-1
src/Drawer.php
src/Drawer.php
+1
-26
src/DrawerInterface.php
src/DrawerInterface.php
+1
-13
No files found.
cache_register.services.yml
View file @
7712aad1
services
:
cache_register.manager
:
class
:
Drupal\cache_register\Manager
arguments
:
[
'
@cache.data'
]
arguments
:
[
'
@cache
'
,
'
@cache
.data'
]
#
# Not really sure if there's a benefit to doing this,
...
...
src/Drawer.php
View file @
7712aad1
...
...
@@ -20,13 +20,6 @@ class Drawer implements DrawerInterface {
*/
protected
$id
;
/**
* Array of slots in the drawer.
*
* @var Slot[]
*/
protected
$slots
=
[];
/**
* The constructor.
*
...
...
@@ -48,9 +41,7 @@ class Drawer implements DrawerInterface {
* {@inheritDoc}
*/
public
function
createSlot
(
$slot_ids
)
{
$slot
=
new
Slot
(
$this
->
cache
,
$this
,
$slot_ids
);
$this
->
slots
[]
=
$slot
;
return
$slot
;
return
new
Slot
(
$this
->
cache
,
$this
,
$slot_ids
);
}
/**
...
...
@@ -60,22 +51,6 @@ class Drawer implements DrawerInterface {
return
$this
->
id
;
}
/**
* {@inheritDoc}
*/
public
function
getSlots
()
{
return
$this
->
slots
;
}
/**
* {@inheritDoc}
*/
public
function
deleteAll
()
{
foreach
(
$this
->
slots
as
$slot
)
{
$slot
->
deleteCache
();
}
}
/**
* {@inheritDoc}
*/
...
...
src/DrawerInterface.php
View file @
7712aad1
...
...
@@ -29,19 +29,7 @@ interface DrawerInterface {
public
function
id
();
/**
* @return \Drupal\cache_register\SlotInterface[]
*/
public
function
getSlots
();
/**
* Invalidate (delete) all child slot cache entries.
*
* @return mixed
*/
public
function
deleteAll
();
/**
* Invalidate (delete) all child slot cache entries.
* Invalidate all slots in the drawer.
*
* @return mixed
*/
...
...
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