-
Sub-task
-
Resolution: Fixed
-
Minor
-
2.9, 3.2
-
MOODLE_29_STABLE, MOODLE_32_STABLE
-
MOODLE_32_STABLE
-
I've created a Redis cache store plugin that is available through http://github.com/samhemelryk/moodle-cachestore_redis.git
I'd like to purpose its inclusion into Moodle core.
Please if you would like to see it included within Moodle by default vote for this issue.
Otherwise if you have thoughts to share please comment.
Many thanks
Sam
Original git details;
Repository: git://github.com/samhemelryk/moodle.git
Branch: 48468-29
Pull Diff: http://mdl.icodedthat.com/48468-29
Moodlerooms has a more featureful version available at; https://github.com/durana/moodle-cachestore_redis
Some things about where Redis is at compared with Memcache(d).
PHP7 was released on December 13 2015.
Plugin | Last Released | PHP 7 Support | Session locking plugin for Moodle | Purge single cache | Persistent Data | Locking | URL |
---|---|---|---|---|---|---|---|
Memcache | 2013-04-07 (as beta) | No | No | No | No | No | https://pecl.php.net/package/memcache |
Memcached | 2014-04-01 | No | Yes | No | No | No | https://pecl.php.net/package/memcached |
Redis | 2016-06-10 | Yes | Yes | Yes | Yes | Yes | https://pecl.php.net/package/redis |
Memcache and Memcached seem to not be supporting PHP7 quickly. They also lack the features that we want from a cache store. Redis is an alternative that has the features required.
Redis is only really for multi-node complex setups.
Filesystem cache has problems when using shared storage due to things like NFS attribute caching (15seconds).
Redis is in the top 3% of voted items to be included as a feature in core.
Core needs to be able to provide support for single and multi-node setups without needing to resort to installing a number of plugins. Memcache offered that capability in the past but it's not able to as we move more and more to PHP7. HQ sites have moved to PHP7, but back to filesystem sessions because of issues with alpha memcache plugins they were trying to make work for sessions.
Redis would provide a much simpler list of supported features as it does sessions and caches in one go compared with the Memcache(d) alternatives. It's features are better and it's support is better.
Redis has recently had a session handler accepted into core. And due to the popularity of that it's been accepted to be backported to support branches MDL-55602. Non-core users have also reported porting it as far back as 2.7. It is popular and with session already supported there is an infrastructure requirement for testing Redis and a cachestore using the same infrastructure does not add any further burden.
The purging issue with memcache(d) has been outstanding for 2 years, MDL-45375. It even suggests that a better solution may be to attempt to implement Redis rather than trying to solve the purging issues that are inherit in the design of memcache.
I would consider removing both of the memcache(d) plugins in favour of Redis to keep the number of core plugins down.
- has a non-specific relationship to
-
CONTRIB-4707 Cache store plugin for Redis
- Closed
-
MDL-49149 Speed up phpunit executions using memory store instance for faster caches reset
- Reopened
-
MDL-56273 purge_all() on unit tests can fail as store::initialise is different from store::initialise_unit_test_instance
- Closed
- has been marked as being related by
-
MDL-53599 Sessions: Add support for Redis as a session_class_handler
- Closed
- is blocked by
-
MDL-56273 purge_all() on unit tests can fail as store::initialise is different from store::initialise_unit_test_instance
- Closed
- Testing discovered
-
MDL-56748 Memory leak in MUC reset
- Closed
- will be (partly) resolved by
-
MDL-69668 Add Redis Sentinel support to Moodle core
- Open