Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
acumatica
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
acumatica
Commits
b50e38fe
Commit
b50e38fe
authored
Feb 23, 2023
by
Dimitris Bozelos
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3343859
Session storage methods should not rely on cache
parent
1b98cb8b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Session/SessionStorage.php
+8
-8
8 additions, 8 deletions
src/Session/SessionStorage.php
with
8 additions
and
8 deletions
src/Session/SessionStorage.php
+
8
−
8
View file @
b50e38fe
...
...
@@ -88,10 +88,10 @@ class SessionStorage implements SessionStorageInterface {
public
function
exists
(
string
$id
=
SessionInterface
::
SESSION_ID_DEFAULT
):
bool
{
//
Creating/deleting sessions should always happen through the interface
//
provided by this storage. We therefore do not need to actually load the
//
session from the storag
e.
return
isset
(
$this
->
cache
[
$id
]
);
//
We don't check existing in the cache because we load sessions as
//
requested. There may therefore exist sessions in the store that do not
//
yet exist in the cach
e.
return
$this
->
store
->
has
(
$id
);
}
/**
...
...
@@ -106,10 +106,10 @@ class SessionStorage implements SessionStorageInterface {
* {@inheritdoc}
*/
public
function
getCount
():
int
{
//
Creating/deleting sessions should always happen through the interface
//
provided by this storage. We therefore do not need to actually load the
//
sessions from the storag
e.
return
count
(
array_filter
(
$this
->
cache
));
//
We don't get the count from the cache because we load sessions as
//
requested. There may therefore exist sessions in the store that do not
//
yet exist in the cach
e.
return
count
(
$this
->
store
->
getAll
(
));
}
/**
...
...
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