Skip to content
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

Cache teachers in course #12

Open
abias opened this issue Nov 30, 2021 · 0 comments
Open

Cache teachers in course #12

abias opened this issue Nov 30, 2021 · 0 comments

Comments

@abias
Copy link
Member

abias commented Nov 30, 2021

On https://github.com/moodleuulm/moodle-block_people/blob/master/block_people.php#L106-L116, the plugin fetches the teachers everytime the block is displayed.
However, get_role_users() always triggers a DB query and does not cache the teacher lists.

It would be worthwhile to implement a cache within the plugin which caches the teacher list per course and invalidates it in case of enrolment or role changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant