Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
oswald
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
oswald
Commits
fa29fc39
Commit
fa29fc39
authored
Feb 12, 2024
by
Dave Mentens
Committed by
Bram Driesen
Feb 12, 2024
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3420776
: Improve caching when auto open is prevented on mobile
parent
d061d378
Branches
Branches containing commit
Tags
4.0.0-alpha10
Tags containing commit
1 merge request
!13
Added cache tags to have separate cache for mobile and desktop requests.
Pipeline
#93183
passed with warnings
Feb 12, 2024
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Entity/OswaldChatbot.php
+18
-1
18 additions, 1 deletion
src/Entity/OswaldChatbot.php
with
18 additions
and
1 deletion
src/Entity/OswaldChatbot.php
+
18
−
1
View file @
fa29fc39
...
...
@@ -221,7 +221,7 @@ class OswaldChatbot extends ContentEntityBase implements OswaldChatbotInterface
}
/**
* Determine if the request i
f
made from a mobile device.
* Determine if the request i
s
made from a mobile device.
*
* @return bool
* Returns true if the request is made from a mobile device.
...
...
@@ -237,4 +237,21 @@ class OswaldChatbot extends ContentEntityBase implements OswaldChatbotInterface
return
$detect
->
isMobile
();
}
/**
* {@inheritDoc}
*/
public
function
getCacheTags
()
{
$cache_tags
=
parent
::
getCacheTags
();
if
(
$this
->
getPreventAutoOpenMobile
()
==
'true'
)
{
$cache_tags
[]
=
'oswald_chatbot.prevent_auto_open:1'
;
$cache_tags
[]
=
'oswald_chatbot.is_mobile:'
.
$this
->
isMobileRequest
();
}
else
{
$cache_tags
[]
=
'oswald_chatbot.prevent_auto_open:0'
;
}
return
$cache_tags
;
}
}
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
sign in
to comment