1
0
mirror of https://github.com/moodle/moodle.git synced 2025-07-15 11:26:30 +02:00
Commit Graph

45 Commits

Author SHA1 Message Date
93c0dc8ec4 MDL-70233 cache: Disabled factory now gets writer from parent 2021-04-07 15:33:31 +10:00
ba9fc5ed57 MDL-41492 cache: Added ability for alternate cache config 2020-09-28 15:12:33 +10:00
d98bbcbbe6 MDL-42012 cache: Fully disable cache for disabled cache factory 2020-09-09 14:04:05 +08:00
063c9ee94f MDL-42012 cache: Allow data sources to work when caching is disabled 2020-09-09 13:59:41 +08:00
4998d3a5be MDL-59427 MUC: cache_helper::purge_all should reset adhoc caches 2017-06-30 11:15:30 +01:00
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
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
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
ca9a79dae3 MDL-56348 cache: Removed second parameter
There is no second parameter in the api
and identifier should be set by set_identifiers
2016-10-11 12:50:10 +08:00
c0d8831ae7 MDL-45699 behat: Don't use behat/lib.php functions in core.
behat/lib.php script should not be usually included, neither any of its functions
used within mooodle code at all. It's for exclusive use of behat and
moodle setup.php. For places requiring a different/special behavior
needing to check if are being run  as part of behat tests, use:
    if (defined('BEHAT_SITE_RUNNING')) { ...
2014-12-23 12:29:44 +01:00
427c41ef2d MDL-45699 cache: renamed cache_config_phpunittest
Renamed cache_config_phpunittest to cache_config_testing
2014-12-09 10:51:38 +13:00
45a8db7f7b MDL-45699 cache: acceptance test improvements
We now use the unit test cache config class when running
acceptance tests so that the same defines are applicable there.
2014-12-09 10:51:34 +13:00
83bee88119 MDL-47832 cache: removed data source aggregate functionality
Cache data source aggregate functionality was found to be broken
and unused, because of this the decision was made to remove it
rather than fix it.
As it was broken we did not follow typical deprecation methods and
instead the code was removed outright with only structure
remaining and left deprecated.
2014-11-20 11:02:56 +13:00
eefb680d8e MDL-45513 cache: implemented defines for unit testing alternative caches 2014-05-30 08:41:07 +12:00
79a8ea653c MDL-45513 cache: added support to unit tests for alt cache stores 2014-05-30 08:41:07 +12:00
5bcfd504df MDL-45618 Fix @since PHPdoc tags. 2014-05-19 17:03:04 +01:00
c2dc13a017 MDL-43349 cache: added back are_requirements_met calls 2014-01-09 23:02:14 +01:00
ccc22a096a MDL-43349 cache: is_ready now checks are_requirements_met by default
(Fixes the fixed forwarded static call bug reverted in a5581c7)
2014-01-07 11:47:18 +08:00
a5581c7376 Revert "MDL-43349 cache: is_ready now checks are_requirements_met by default"
This reverts commit 2201c02d73.
2014-01-06 14:47:12 +08:00
2201c02d73 MDL-43349 cache: is_ready now checks are_requirements_met by default 2014-01-02 09:55:51 +13:00
07658be7b4 MDL-43349 cache: init now checks store requirements are met 2014-01-02 09:44:25 +13:00
e28a953996 MDL-43033 cache: fixed display of definition stores in admin interface 2013-12-02 09:30:03 +13:00
bf77c0b273 MDL-43033 cache: fixed mode map event invalidation scenario 2013-12-02 09:30:03 +13:00
d074fb091d MDL-40903 cache: renamed persistcache to staticacceleration 2013-09-25 09:05:18 +12:00
083fa87759 MDL-40903 cache: converted persistent into persistentdata
At the same time all cache instances were made persistent
2013-09-25 09:04:35 +12:00
06f6885b27 MDL-41558 cache: Improve performance of cache::make() by using isset instead of array_key_exist() 2013-09-03 13:36:59 +08:00
dbd2ea4e1f MDL-38565 cache: session caches now function as expected
This change is a large change to the way sessions are handled
within MUC after it was discovered that session did not function
as expected when any store other than the default session store
was being used.
As part of this change the session loader has been largely
customised in order to consolidate session data for the loader.
The unit tests have also being greatly increased to provide
better coverage for sessions.
2013-04-19 10:11:48 +12:00
7b9cb736ba MDL-38387 cache: removed call to plugins API from cache API 2013-03-20 16:07:25 +13:00
3d6dd54ad1 MDL-38165 cache: fixed issues purging peristent caches by event 2013-03-01 11:38:02 +13:00
7634410b6e MDL-37683 cache: improved indentifier collection and storage 2013-02-18 10:20:02 +13:00
e0d9b7c0d4 MDL-37683 cache: siteidentifier is now included in the keys 2013-02-18 08:32:03 +13:00
79c55ca344 MDL-36322 cache: implemented cache_store::create_clone 2013-02-01 08:49:03 +13:00
9890ecfc25 MDL-37545 cache: fixed bug during initialisation and updating of cache config 2013-01-28 10:40:37 +13:00
086e78da69 MDL-36357 cache: removed double semicolon 2013-01-09 09:37:09 +13:00
94ef67cf5f MDL-36466 cache: tidy up after review 2012-11-26 08:12:00 +13:00
3680c61a3c MDL-36466 cache: implemented functionality to disable the bulk of the cache API 2012-11-26 08:12:00 +13:00
82afd05c35 MDL-36466 cache: renamed disable to disable_stores and added tests 2012-11-26 08:12:00 +13:00
c9f40e77b7 MDL-36466 cache: renamed define NO_CACHE_STORES to CACHE_DISABLE_STORES 2012-11-26 08:12:00 +13:00
7383a7e2a0 MDL-36466 cache: improved handling of exceptions during initialisation. 2012-11-26 08:11:59 +13:00
2566210c63 MDL-36407 cache: Implemented options for ad_hoc caches 2012-11-12 10:05:05 +13:00
47834bcd41 MDL-36120 cache: now uses sha1 and has an option for simple keys 2012-11-07 10:03:32 +13:00
170f821b9d MDL-25290 cache: Fixed things up per coding style 2012-10-08 09:53:52 +13:00
34c84c723a MDL-25290 cache: Added cache locking plugin and converted locking implementations to that 2012-10-08 09:53:51 +13:00
6fec18203b MDL-25290 cache: Renamed plugin from cache => cachestore 2012-10-08 09:53:51 +13:00
8139ad13a5 MDL-25290 cache: Implemented Cache API aka MUC 2012-10-08 09:53:50 +13:00