Add cache-edit-mapping and cache-add-redis-store for Moodle 405 #501
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: #500
I'm quite newby with PHP so it might not be the best solution.
cache-edit-mapping
Mostly just renaming the class following this document: https://github.com/moodle/moodle/blob/main/cache/UPGRADING.md
I had a strange problem where the Moosh login function failed with the following message, if redis was already used as a sessionhandler:
Therefore I added the following code in order to avoid a login, I couldn't find a better solution:
cache-add-redis-store
Use 3 digit versions number
I started by naming the folder Moodle45 but still received errors because moosh was using Moodle310 cache-add-redis-store.
Moodle started using 3 digits number version for branch in version.php with Moodle 310.
Therefore, when I tried to use the 45 version it would pickup Moodle 310 as 310 > 45 as you can see here:
The only way to make moosh pickup the right version was to refractor the whole numbering to start using 3 digit.