Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
173
Issues
173
List
Boards
Labels
Service Desk
Milestones
Merge Requests
42
Merge Requests
42
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Compare Revisions
09adb0ac614dea231e8b52bbb4e47a7a12d94733...3f3f52ecf61764d6fa1cb0d056b841d7e7a47fe5
Source
3f3f52ecf61764d6fa1cb0d056b841d7e7a47fe5
Select Git revision
...
Target
09adb0ac614dea231e8b52bbb4e47a7a12d94733
Select Git revision
Compare
Commits (2)
(fix): $cacheKey should consider quality and rating
· c34608ff
Marcelo Rivera
authored
1 hour ago
c34608ff
(fix): ios and new users check should be done before checking cache
· 3f3f52ec
Marcelo Rivera
authored
1 hour ago
3f3f52ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
campaigns.php
Controllers/api/v2/boost/fetch/campaigns.php
+11
-9
No files found.
Controllers/api/v2/boost/fetch/campaigns.php
View file @
3f3f52ec
...
...
@@ -58,15 +58,6 @@ class campaigns implements Interfaces\Api
$limit
=
500
;
}
$cacher
=
Core\Data\cache\factory
::
build
(
'Redis'
);
$cacheKey
=
Core\Session
::
getLoggedinUser
()
->
guid
.
':boost-offset-rotator:'
.
$type
;
// $offset = $cacher->get($cacheKey);
$offset
=
null
;
if
(
!
$offset
)
{
$offset
=
0
;
}
// Options specific to newly created users (<=1 hour) and iOS users
if
(
$platform
===
'ios'
)
{
...
...
@@ -77,6 +68,17 @@ class campaigns implements Interfaces\Api
$quality
=
75
;
}
$userGuid
=
Core\Session
::
getLoggedinUser
()
->
guid
;
$cacher
=
Core\Data\cache\factory
::
build
(
'Redis'
);
$cacheKey
=
"
{
$userGuid
}
:boost-offset-rotator:
{
$type
}
:
{
$quality
}
:
{
$rating
}
"
;
// $offset = $cacher->get($cacheKey);
$offset
=
null
;
if
(
!
$offset
)
{
$offset
=
0
;
}
/** @var Boost\Campaigns\Manager $manager */
$manager
=
Di
::
_
()
->
get
(
'Boost\Campaigns\Manager'
);
...
...
This diff is collapsed.
Click to expand it.