Commit Graph

17 Commits

Author SHA1 Message Date
sam marshall 8ddfa20121 MDL-72328 cachestore_redis: Add TTL support for Redis cache
A list of times for each cache key in a TTL cache is kept in a Redis
sorted list, which can be queried efficiently to delete expired
cache items later in a scheduled task.

This change makes set and delete 2x slower (only for caches which use
TTL) but there is no impact on get performance.
2021-09-21 13:43:11 +01:00
Michael Aherne 2385ae7ee2 MDL-65941 cache: Prevent cache config failure on redis problems. 2020-11-11 14:33:22 +08:00
Mark Nelson de0b6d938c MDL-66428 cachestore_redis: add Zstd compression support 2019-10-07 19:03:43 +01:00
Mark Nelson 493295e326 MDL-63127 cachestore_redis: dont use compression unless specified 2019-10-07 18:23:10 +01:00
Mark Nelson 4ccbb67474 MDL-63127 cachestore_redis: do not return early without unserialisation 2019-10-07 12:12:48 +01:00
Mark Nelson 3ad56eee9f MDL-63127 cachestore_redis: add check before using igbinary_serialize
Redis::SERIALIZER_IGBINARY is undefined if redis is not compiled
with this option.
2019-10-07 12:12:48 +01:00
Mark Nelson 54a659a5bd MDL-63127 cachestore_redis: delegate functionality to specific areas
These functions should not have to worry about compression logic.
2019-10-07 12:12:48 +01:00
Mark Nelson ac19c888b0 MDL-63127 cachestore_redis: set pair value correctly 2019-10-07 12:12:48 +01:00
Daniel Thee Roperto cda3e431ca MDL-63127 cachestore_redis: Implemented compression 2019-10-07 12:12:48 +01:00
Netica Informática d17bf23e8a MDL-66139 cachestore_redis: Fix connection problems when port is not set
Due to some changes in Redis 5 php extension Moodle fails to connect via TCP when
no port is set. It's fixed upstream in phpredis repo (version 5.0.0, 5.0.1 and
5.0.2 affected so far), but with this patch we'll send the right port anyway.
2019-08-28 20:57:40 +02:00
Andrew Nicols 31b02f6ef5 MDL-63050 cachestore_redis: Update hExists to check empty 2018-08-02 10:59:53 +08:00
Andrew Nicols 30829b5dc3 MDL-58311 cachestore_redis: Set password correctly 2017-04-12 14:41:54 +08:00
Mike Olsen 7782e6610b MDL-58311 cache: Add password support for redis
add password support for redis connects in cache and session
2017-03-27 10:31:45 +01:00
wehr 9c860cea46 MDL-57572 cache: Adds igbinary serializer to Redis cache store 2017-01-06 16:26:43 +01:00
Dan Poltawski 6765172ed1 NOBUG: Fixed file access permissions 2016-11-04 11:20:33 +00:00
Tomasz Sanecki fd7bb5a8d9 MDL-48468 cache: add support for port in server address 2016-10-30 13:34:43 +11:00
Russell Smith 68b1e13094 MDL-48468 cache: Import Redis cachestore
This code was originally taken from; https://github.com/durana/moodle-cachestore_redis
Special thanks to Mark Nielsen and Adam Durana for their work on this.

Since the original import;
- Mode session support has been added.
- Some cleanup of names has been made.
- Data guarantee and references support was added.
2016-10-30 13:34:43 +11:00