411 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
d5be859063 MDL-67199 versions: bump all versions and requires near release
version = 2019111800 release version
requires= 2019111200 current beta (week7roll1) version
2019-11-12 17:57:08 +01:00
Marina Glancy
bcfa5e248c MDL-67087 cachestore_redis: fix warning in phpunit 2019-10-30 18:52:22 +01:00
Eloy Lafuente (stronk7)
f4feabb83f MDL-66968 php74: array_key_exists() for objects is deprecated
Replace it for correct property_exists() when the element
being inspected is a property of object/class.

Amended and squased changes:
- keep mongo unmodified. The information is array, hence correct.
- fix a couple of messaging phpdocs that were incorrect.

Amended take#2:
- As far as mongo resturns BSONDocument that is ArrayObject, aka
implements ArrayAccess, we have decided to explicitly cast results
to array so existing array_key_exists() and other accesses will
continue working the same.
2019-10-25 00:49:04 +02: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
Eloy Lafuente (stronk7)
f232409e13 MDL-63127 cachestore_redis: cover combinations without compressor
To verify that, internally, everything is stored as expected
and there aren't hidden regressions
2019-10-07 18:23:10 +01:00
Mark Nelson
182a0698e1 MDL-63127 cachestore_redis: clean up compressor_test.php 2019-10-07 12:12:48 +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
Jake Dallimore
9e93b2f20e Merge branch 'MDL-66139' of https://github.com/stronk7/moodle 2019-08-29 11:51:06 +08: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
Mark Nelson
8e86a8d2db MDL-60341 core_cache: show cache definitions that can use local store 2019-08-28 14:00:38 +08:00
Eloy Lafuente (stronk7)
f795e2008f NOBUG: Fixed file access permissions 2019-07-11 23:33:29 +02:00
Víctor Déniz Falcón
8b7d951046 MDL-65772 cachestore_mongodb: fix the version number of the library 2019-07-01 12:40:59 +01:00
Tim Hunt
376b7fb857 MDL-65492 cache admin: make it easier to purge a cache repeatedly
This can be a big time-saver, e.g. during development.
2019-06-12 13:23:06 +01:00
Tim Hunt
1baf3af3e8 MDL-65492 cache admin: make the code easier to understand 2019-06-12 13:23:03 +01:00
Eloy Lafuente (stronk7)
c9a1a6341c MDL-65571 versions: bump all versions and requires near release
version = 2019052000 release version
requires= 2019051100 current beta (week6roll2) version
2019-05-12 23:46:34 +02:00
David Monllaó
f82701acad Merge branch 'MDL-59326' of https://github.com/paulholden/moodle 2019-04-15 07:47:33 +02:00
Leon Stringer
36b6444420 MDL-64719 cache: Implement purge_current_user() in \cache
\cache::make() may return a cache_disabled subclass but callers, specifically
user/lib.php:user_create_user(), invoke \cache::purge_current_user() which was
only implemented by the cache_session subclass.  Added empty
\cache::purge_current_user() which subclasses can implement, i.e.
cache_session, or not, i.e. cache_disabled.
2019-04-01 15:29:39 +01:00
Paul Holden
114973b549 MDL-59326 admin: use passwordunmask element for shared secrets. 2019-03-29 09:27:45 +00:00
Eloy Lafuente (stronk7)
c071eefced NOBUG: Fixed file access permissions 2019-03-21 20:19:27 +01:00
Victor Deniz Falcon
02a5d26bd5 MDL-54592 cachestore_mongodb: check MongoDB server connection
The connection to the MongoDB server is checked on the creation and
deletion of a cache store instance. If the connection fails during
creation, the instance is set as not ready. Before deleting a instance,
a new cachestore_mongodb object is created, and connection checked.
There is no reason to check again the connection in the instance_deleted() method.
2019-03-18 11:11:01 +00:00
Víctor Déniz Falcón
2a944b5b41 MDL-54592 cachestore_mongodb: MongoDB cache store use new driver.
The scope of this change is limited to modifying the MongoDB cache
plugin to use the new version of the driver that accepts PHP 7.x
versions. Following the instructions in the official MongoDB
documentation, https://docs.mongodb.com/php-library/current/, the
MongoDB PHP Library was included and used.
2019-03-15 13:50:51 +00:00
Víctor Déniz Falcón
b3c0e79678 MDL-54592 cachestore_mongodb: add MongoDB PHP Library
The new mongodb extension provides a limited API. The MongoDB PHP adds a
high level abstraction layer that provides methods for CRUD operations
and common commands. This version of MongoDB PHP Library requires
the PHP mongodb extension >= 1.5.
2019-03-15 13:50:51 +00:00
David Mudrák
ea43f6c1c8 MDL-64452 cache: Add tests for key prefix based on session id
Unfortunately, we can't simply use session_id() to regenerate the
session id in unit tests. Starting from PHP 7.2, it would trigger
"session_id(): Cannot change session id when headers already sent",
refer to MDL-60978 and PHP bug #75628 for more details.

As a workaround, we use a static property allowing us to inject the
value that we then use as a session identifier. This is reasonably
enough to make sure that the identifier is used as a part of the key
prefix.
2019-02-15 09:36:43 +01:00
David Mudrák
0ea0dfde6d MDL-64452 cache: Always use the current session id in the key prefix
The current logic in the cache_session::check_tracked_user() is not
right. We must always set the current session id. A typical use case is
when the cache instance is instantiated for a not logged in user. We
can't let the sessionid property null in that case as it forms an
important part of the parsed key.

Similarly, even if we have the same user currently loaded, we must still
set the sessionid to make sure the data will be associated with the
current PHP session. Same user (including visitors or guest users) can
access the site from different browsers and each must end up with its
own key prefix.
2019-02-15 09:36:43 +01:00
Helen Foster
65d70aa81b MDL-64509 lang: Import fixed English strings (en_fix)
Significant string change: enablerunnow_desc,tool_task - including
mention of pathtophp requirement
2019-01-07 14:40:34 +01:00
Eloy Lafuente (stronk7)
085353b315 MDL-64282 versions: bump all versions and requires near release
version = 2018120300 release version
requires= 2018112800 current rc2 (week7roll1) version
2018-11-29 18:24:08 +01:00
Andrew Nicols
c96cd71102 MDL-63924 privacy: Add shared user providers to subsytsems 2018-11-08 21:26:18 +08:00
Helen Foster
0c19b2c8fa MDL-63730 lang: Merge English strings from the en_fix language pack
Significant string changes:

* withselectedusers_help, core - removing mention of 'Add a common note'
  as the option no longer exists
* considereddigitalminor and digitalminor_desc, core - more
  child-friendly wording
* configmessagingallusers, core_admin - clearer explanation
* auth_dbtype, auth_db - fixed broken link
2018-10-26 12:48:40 +02:00
Shamim Rezaie
19fc6012cf MDL-63554 cachestore_session: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:31 +02:00
Shamim Rezaie
936c06f8bb MDL-63554 cachestore_redis: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:30 +02:00
Shamim Rezaie
a42c9a71bb MDL-63554 cachestore_mongodb: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:30 +02:00
Shamim Rezaie
81684f7c8b MDL-63554 cachestore_memcached: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:30 +02:00
Andrew Nicols
666196271f MDL-60630 cachestore: Remove memcache plugin 2018-09-12 21:07:01 +08:00
Andrew Nicols
0a197875df MDL-63101 cache: Improve accuracy of cache event invalidation 2018-08-27 14:43:42 +08:00
Andrew Nicols
31b02f6ef5 MDL-63050 cachestore_redis: Update hExists to check empty 2018-08-02 10:59:53 +08:00
Eloy Lafuente (stronk7)
57ea6753d3 MDL-62361 versions: bump all versions and requires near release
version = 2018051400 release version
requires= 2018050800 current beta+ (week4roll1) version
2018-05-09 02:46:30 +02:00
Andrew Nicols
f7bac7ac8d MDL-61898 cache: Implement privacy API for all stores and locks 2018-05-02 13:36:07 +08:00
Andrew Nicols
26bb44e5f4 MDL-61898 core_cache: Implement Privacy API 2018-04-30 14:07:27 +08:00
Helen Foster
ad5b7d26e7 MDL-61533 lang: Merge English strings from the en_fix language pack
Significant string change:

* typeoflogin_desc,tool_mobile - removing sentence about autologinguests
* gradepublishing_help, core_grades - updated explanation mentioning the
  manager role and grade export publishing settings
2018-03-01 17:17:16 +01:00
Eloy Lafuente (stronk7)
66aee746e3 MDL-60764 versions: remove some outdated releases in requires 2017-11-10 09:45:56 +01:00
Eloy Lafuente (stronk7)
ba854606e6 MDL-60764 versions: bump all versions and requires near release
version = 2017111300 release version
requires= 2017110800 current rc2 version
2017-11-10 02:52:53 +01:00
Marina Glancy
78da366b56 MDL-60281 general: various strict corrections for PHP7.2
- count() can only be called on arrays or Countable, it can not be called on null
- recordset is neither so iterator_count() should be used
- instanceof or get_class() can not be applied to non-objects
- class methods must have the same arguments as methods in parent class
2017-10-16 09:37:20 +08:00
sam marshall
4998d3a5be MDL-59427 MUC: cache_helper::purge_all should reset adhoc caches 2017-06-30 11:15:30 +01:00
Dan Poltawski
1be1d5e5cf Merge branch 'MDL-58658' of https://github.com/sk-unikent/moodle 2017-06-06 10:00:42 +01:00
Skylar Kelty
761ac5a0aa
MDL-58658 caching: Add static acceleration unit test for empty arrays 2017-05-11 10:56:04 +01:00