378 Commits

Author SHA1 Message Date
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
Eloy Lafuente (stronk7)
d989ee1e03 MDL-58853 versions: bump all versions and requires near release
version = 2017051500 release version
requires= 2017050500 current rc1 version
2017-05-09 02:58:28 +02:00
Andrew Nicols
28bf0a03a7 MDL-56675 cachestore_memcached: Check all connected servers for support 2017-05-04 13:11:07 +08:00
Andrew Nicols
77f1729eec MDL-56675 cachestore_memcached: Disable store if not purgeable
If the store is shared and the getAllKeys function is broken due to an
incompatability between libmemcached and memcached >= 1.4.23, then it is
not possible to purge the cache, and we cannot support the plugin.

This patch adjusts the isready check to additionally check if the
combination of libmemcached and memcached is affected by this issue.
2017-05-03 09:24:23 +08:00
Skylar Kelty
32ec2da151 MDL-58658 caching: Fix static acceleration for empty arrays 2017-04-20 09:49:09 +01:00
Andrew Nicols
30829b5dc3 MDL-58311 cachestore_redis: Set password correctly 2017-04-12 14:41:54 +08:00
Andrew Nicols
3de074e4bf Merge branch 'MDL-58311_master' of https://github.com/sk-unikent/moodle 2017-04-10 12:00:59 +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
Eloy Lafuente (stronk7)
4d505af519 Merge branch 'MDL-55267-master-deprecation' of https://github.com/marcusgreen/moodle 2017-03-21 10:18:56 +01:00
Rajesh Taneja
dba39da081 MDL-58169 phpunit: Clear opcode cache before checking file
In unit test, we write cache file often and
opcache might fail to detect changes. It will
be nice to invalidate opcode cache to ensure
we have the correct file_exists status
2017-03-14 13:30:24 +08:00
Marcus Green
f2894f322d MDL-55267 cache: Remove deprecated field datasourceaggregate 2017-03-13 16:31:45 +00:00
Russell Smith
f3789f2fb3 MDL-45584 cache: Make identifiers part of the cache creation.
It is now safe to cache a reference to a cache and expect consistent results.

Changing identifiers altered cache results where a reference was
held to the cache. Identifiers have been set to be cached with
identifiers included so the caches are separate.

As a consequence of this it was identified that invalidation events
and identifiers don't easily work together as an event can't determine
which identifiers should be used for cache invalidation.  So invalidation
events have been made incompatible with identifiers being set.  No core
code used this combination as it's not possible to understand any expected
behaviour.

Event invalidation for application and session caches was centralised to the same
location.  The only difference was the name of the lastinvalidation variable. This
improves support and consistency of invalidation code.
2017-03-02 11:06:17 +08:00
Eloy Lafuente (stronk7)
121c17a72e MDL-57570 static store: Basic serialize tests with igbinary
This unit test is not really verifying that internally igbinary
in being used but just igbinary availability and, by double
serializing, that it works for a semi-complex object.

The test will be skipped if igbinary is not available.
2017-01-18 19:23:59 +01:00
Eloy Lafuente (stronk7)
c5bd22b1ea Merge branch 'MDL-57570-master' of https://github.com/mwehr/moodle 2017-01-18 01:27:36 +01:00
Rajesh Taneja
464a79ba6d
MDL-57659 cache: Set default serializer to SERIALIZER_PHP 2017-01-16 14:35:53 +08:00
wehr
7ca1161645 MDL-57570 cache: Adds igbinary serializer to static cache store 2017-01-11 23:05:39 +01:00
Eloy Lafuente (stronk7)
e238dcc8b2 MDL-57572 redis: Prevent installation to fail on sites without redis 2017-01-11 02:22:48 +01:00
Eloy Lafuente (stronk7)
7bdbad80d8 Merge branch 'MDL-57572-master' of https://github.com/mwehr/moodle 2017-01-10 19:25:44 +01:00
Jonathan Champ
d3a6b91aec MDL-57427 cache: Use perfdebug only when enabled 2017-01-09 10:18:13 -05:00
wehr
9c860cea46 MDL-57572 cache: Adds igbinary serializer to Redis cache store 2017-01-06 16:26:43 +01:00
Eloy Lafuente (stronk7)
04649747a4 MDL-57197 versions: bump all versions and requires near release
version = 2016120500 release version
requires= 2016112900 current rc4 version
2016-11-29 22:57:05 +01:00
Rajesh Taneja
96813571b1
MDL-57147 phpunit: Check if time is greater than or equal to
Some windows only have 1/100 microtime resolution
so a lot of times it does not advance enough.
2016-11-28 09:40:21 +08:00
Helen Foster
7f6accd448 MDL-56903 lang: Merge English strings from the en_fix language pack 2016-11-15 11:19:48 +01:00
Dan Poltawski
6765172ed1 NOBUG: Fixed file access permissions 2016-11-04 11:20:33 +00:00
Andrew Nicols
70aa00de87 MDL-56748 cache: Removes cache definition instances in purge_store
Previously a purge_store was only purging caches but it was leaving a
reference to the store instance for the cache definition.

As a result, the cache was never cleared away correctly and, in cases
where the cache store makes a TCP connection to a backend system, the
number of open sockets was increasing for each store instance.

After a complete purge, as found in the unit test reset, the cache
definitions should be both purged and removed.

This change should also lead to a drop in memory consumption for unit
tests as there will no longer be references to unused definition stores.
2016-11-04 13:26:46 +08:00
Andrew Nicols
8fa816e0b0 Merge branch 'wip-mdl-56273' of https://github.com/rajeshtaneja/moodle 2016-11-02 14:30:08 +08:00
Rajesh Taneja
4a910b9aa6
MDL-56273 cache: Fixed initialise call
After store is created, it should be checked if
it's ready before calling initialise
2016-11-02 14:26:50 +08:00
Andrew Nicols
c6ae02c184 Merge branch 'MDL-48468' of https://github.com/mr-russ/moodle 2016-11-02 10:13:42 +08:00
Andrew Nicols
326b285467 Merge branch 'MDL-56273' of https://github.com/mr-russ/moodle 2016-11-01 10:55:23 +08:00
Dan Poltawski
f2263f7c06 Merge branch 'MDL-56542-master-enfix' of git://github.com/mudrd8mz/moodle 2016-10-31 15:15:09 +00:00
Russell Smith
a330e83ade MDL-56273 cache: Use is_ready() to determine if cache is really ready. 2016-10-31 19:44:05 +11:00
Russell Smith
f9599c77cc MDL-56273 cache: Ensure requirements are met for cache stores.
Ensure that the cache store requirements are met prior to attempting
to instantiate a class.  Many of the constructors create connections
to external services requiring the installation and availability of
classes that are specified in are_requirements_met().  If they are
not checked properly you end up with PHP Fatal errors rather than
falling back to a different store that is capabable without the
the extra classes loaded.
2016-10-31 16:04:51 +11:00
Russell Smith
a169739d5d MDL-56273 cache: Use cache initialise always.
purge_all() and purge_by_definition() look in the configuration
for which caches are available and then creates them to purge them.
The configuration stores the values used by initialise(), not
initialise_unit_test_instance() and would therefore fail to purge
all caches if they were not purged by another means.

In the case of filestore, it's purged by unit tests, in the case
of memcache(d), it purges the whole store when a single definition
is requested.

Therefore all configuration was moved into the configuration file
during unit tests and does not have any special override codes in
the unit test infrastructure.
2016-10-30 13:42:43 +11:00
Tomasz Sanecki
fd7bb5a8d9 MDL-48468 cache: add support for port in server address 2016-10-30 13:34:43 +11:00