-
Notifications
You must be signed in to change notification settings - Fork 23
Video listing optimization and caching #1389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- indexes in migration - videos count sql optimization - video listings cache system
@@ -5,6 +5,7 @@ | |||
use Opencast\Models\REST\ApiPlaylistsClient; | |||
use Opencast\Helpers\PlaylistMigration; | |||
use Opencast\Errors\Error; | |||
use Opencast\Caching\VideosCaching; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Opencast\Caching\VideosCaching; |
(new VideosCaching())->playlistVideos($this->id)->expire(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(new VideosCaching())->playlistVideos($this->id)->expire(); |
@@ -10,6 +10,7 @@ | |||
use Opencast\Models\REST\ApiWorkflowsClient; | |||
use Opencast\Models\Helpers; | |||
use Opencast\Models\ScheduledRecordings; | |||
use Opencast\Caching\VideosCaching; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Opencast\Caching\VideosCaching; |
|
||
/** | ||
* @inheritDoc | ||
* | ||
* Overriding store method, in order to expire caches. | ||
*/ | ||
public function store() | ||
{ | ||
VideosCaching::expireAllVideoCaches($this); | ||
return parent::store(); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
* | ||
* Overriding delete method, in order to expire caches. | ||
*/ | ||
public function delete() | ||
{ | ||
VideosCaching::expireAllVideoCaches($this); | ||
return parent::delete(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* @inheritDoc | |
* | |
* Overriding store method, in order to expire caches. | |
*/ | |
public function store() | |
{ | |
VideosCaching::expireAllVideoCaches($this); | |
return parent::store(); | |
} | |
/** | |
* @inheritDoc | |
* | |
* Overriding delete method, in order to expire caches. | |
*/ | |
public function delete() | |
{ | |
VideosCaching::expireAllVideoCaches($this); | |
return parent::delete(); | |
} |
@@ -8,6 +8,7 @@ | |||
use Opencast\OpencastController; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file need to be reverted
@@ -12,6 +12,7 @@ | |||
use Opencast\Models\Playlists; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file need to be reverted
@@ -8,31 +8,49 @@ | |||
use Opencast\OpencastController; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file need to be reverted
|
||
public function decodeVars() | ||
{ | ||
return base64_encode(json_encode(get_object_vars($this))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function decodeVars() | |
{ | |
return base64_encode(json_encode(get_object_vars($this))); | |
} |
@@ -0,0 +1,137 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file needs to be deleted
This PR fixes #1321,
The goal is to increase the query performance and decrease the video listing time in workspace and course / playlist.
Introduces:
As initial stage, it is considered as a proof of concept and might receive changes afterwards