Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
245
Issues
245
List
Boards
Labels
Service Desk
Milestones
Merge Requests
31
Merge Requests
31
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
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
Commits
5f6f42d7
Commit
5f6f42d7
authored
1 minute ago
by
Mark Harding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(chore): tweak to boost offset
parent
a7d030e1
master
No related merge requests found
Pipeline
#79806958
running with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
feed.php
Controllers/api/v2/boost/feed.php
+7
-6
No files found.
Controllers/api/v2/boost/feed.php
View file @
5f6f42d7
...
...
@@ -118,11 +118,12 @@ class feed implements Interfaces\Api
$next
=
$iterator
->
getOffset
();
if
(
isset
(
$boosts
[
1
])
&&
!
$isBoostFeed
)
{
// Always offset to 2rd in list if in rotator
if
(
!
$offset
)
{
$next
=
$boosts
[
1
]
->
getTimestamp
();
}
else
{
$next
=
0
;
}
// if (!$offset) {
// $next = $boosts[1]->getTimestamp();
// } else {
// $next = 0;
// }
$next
=
$boosts
[
1
]
->
getTimestamp
();
}
elseif
(
$isBoostFeed
)
{
$len
=
count
(
$boosts
);
$next
=
$boosts
[
$len
-
1
]
->
getTimestamp
();
...
...
@@ -130,7 +131,7 @@ class feed implements Interfaces\Api
// $ttl = 1800; // 30 minutes
// if (($next / 1000) < strtotime('48 hours ago')) {
$ttl
=
150
;
// 2.
5 minutes;
$ttl
=
300
;
//
5 minutes;
// }
$cacher
->
set
(
Core\Session
::
getLoggedinUser
()
->
guid
.
':boost-offset-rotator'
,
$next
,
$ttl
);
...
...
This diff is collapsed.
Click to expand it.
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