Commit Graph

159 Commits

Author SHA1 Message Date
Sam Hemelryk f621e8e3d8 MDL-40903 cached: fixed up versions 2013-09-24 21:13:22 +12:00
Sam Hemelryk 5a804c0f54 MDL-40903 cache: renamed persistcache to staticacceleration 2013-09-24 21:13:22 +12:00
Sam Hemelryk bfff058cc8 MDL-40903 cache: fixed up event invalidation 2013-09-24 21:13:22 +12:00
Marina Glancy 9e72a16e14 MDL-40903 cache: Unittests and small fixes for persistent application cache 2013-09-24 21:13:22 +12:00
Sam Hemelryk 90317c258b MDL-40903 cache: coding style tidyup pre-integration 2013-09-24 21:13:22 +12:00
Sam Hemelryk fcb5548c38 MDL-40903 cache: converted persistent into persistentdata
At the same time all cache instances were made persistent
2013-09-24 21:13:21 +12:00
Eloy Lafuente (stronk7) ee3433a44b Merge branch 'm24_MDL-41410_Move_Comment_To_Appropriate_Place' of https://github.com/scara/moodle into MOODLE_24_STABLE 2013-08-27 19:46:32 +02:00
Dan Poltawski 0f567efc8f Merge branch 'MDL-41291-24' of git://github.com/mr-russ/moodle into MOODLE_24_STABLE 2013-08-26 18:07:11 +08:00
Russell Smith ab2d7d4f3d MDL-41291 cache: Use fread to avoid race conditions 2013-08-26 10:51:23 +10:00
Sam Hemelryk 426e9c79ac MDL-41106 cache: several fixes for the session cache.
This issue makes several fixes for the session loader and the session store.
 * maxsize argument now works for session caches.
 * fixed performance hole when interation occurs frequently.
 * fixed cache purge bug occuring when multiple caches are defined before being used.
 * improved lastaccess handling.

Big thanks to Marina who contributed the following commits:
 * Always make sure the elements in cache are sorted so we need to remove only elements in the beginning of array
 * Remove expired elements from session store to free memory
 * Minor bug fixes
2013-08-26 09:49:57 +12:00
Matteo Scaramuccia 91b9fb3749 MDL-41410 Caching: move comment to the appropriate place.
MDL-38162 fixes the issue about testing the connection to the memcached
daemon, which means testing once the connection to the pool of servers
and not to each of the servers while being added to the pool.
It misses to move the comment to that code too.
2013-08-25 14:17:53 +02:00
Damyon Wiese 07173cac05 Revert "MDL-41106 cache: several fixes for the session cache."
This reverts commit 4973a0cb41.
This reverts commit e3d9d02381.
This reverts commit b4aba7cac2.
2013-08-19 15:34:00 +08:00
Sam Hemelryk 4973a0cb41 MDL-41106 cache: tidied up several elements 2013-08-19 11:31:37 +12:00
Marina Glancy e3d9d02381 MDL-41106 Cleaning up expired elements in session cache store
- Always make sure the elements in cache are sorted so we need to remove only elements in the beginning of array
- Remove expired elements from session store to free memory
- Minor bug fixes

Conflicts:
	cache/stores/session/lib.php
	cache/stores/session/tests/session_test.php
2013-08-19 11:31:11 +12:00
Sam Hemelryk b4aba7cac2 MDL-41106 cache: several fixes for the session cache.
This issue makes several fixes for the session loader and the session store.
* maxsize argument now works for session caches.
* fixed performance hole when interation occurs frequently.
* fixed cache purge bug occuring when multiple caches are defined before being used.
* improved lastaccess handling.
2013-08-16 11:59:31 +12:00
Sam Hemelryk 682f6d57cd Merge branch 'w31_MDL-40891_m24_mkdirrace' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2013-07-29 11:52:14 +12:00
Petr Škoda bde942541e MDL-40891 prevent exceptions when creating directories in file store
Even if cache creation fails moodle should continue working.
2013-07-26 20:32:21 +02:00
Damyon Wiese c8cada1552 MDL-40727 Cache: Fix file cache store on windows. 2013-07-24 17:11:30 +08:00
Eloy Lafuente (stronk7) 4e60c378cf Merge branch 'wip-MDL-40700-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-07-23 13:58:46 +02:00
Sam Hemelryk 1f3be76708 Merge branch 'MDL-40680-24' of git://github.com/danpoltawski/moodle into MOODLE_24_STABLE 2013-07-23 14:12:35 +12:00
Sam Hemelryk ad739cd700 MDL-40700 cache: memcache and memcached stores now allow alphanumext prefixes 2013-07-22 10:41:51 +12:00
Chris Wharton 5886e039ec MDL-40700 cache: Validate memcache key prefix field 2013-07-22 10:41:50 +12:00
Eloy Lafuente (stronk7) d9debeb038 Merge branch 'MDL-40555-24' of git://github.com/FMCorz/moodle into MOODLE_24_STABLE
Conflicts:
	cache/stores/static/lib.php
2013-07-16 09:55:34 +02:00
Damyon Wiese a7228f586b Merge branch 'MDL-40538_24' of https://github.com/mr-russ/moodle into MOODLE_24_STABLE 2013-07-16 10:26:56 +08:00
Dan Poltawski f620ae6c11 MDL-40680 store_memcached: fix serialiser options
* Use correct lang string for SERIALIZER_IGBINARY
* Use PARAM_INT for the parameter
2013-07-16 09:39:16 +08:00
Sam Hemelryk 5cae1b013f MDL-40555 cache: implemented unit tests for default search functionality 2013-07-16 08:36:19 +08:00
Frederic Massart 76edea3d61 MDL-40555 cache: Static store is searchable 2013-07-16 08:35:08 +08:00
Sam Hemelryk 762789f5d7 MDL-39062 cache: persist keys now set properly 2013-07-15 12:02:01 +12:00
Russell Smith 2215cc347a MDL-40538 caching: Use isset for performance
isset is much faster than array_key_exists. For caches we need to
ensure as much performance as possible. To all null to continue to
be stored and provide correct results, non ttl also now saves in
$this->store[$key][0].  As isset($this->store[$key]) will return
true in all cases.

time() as found in cache::now() can be slow on some platforms and
we shouldn't bother checking it unless needed. It also stops non-ttl
caches paying the ttl price.

Unit tests were adjusted to ensure null is still handled correctly
when we are only using isset.
2013-07-10 10:42:51 +10:00
Dan Poltawski 6e74e428af Merge branch 'MDL-39472-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-06-12 14:16:43 +08:00
Sam Hemelryk 5dc899f004 MDL-40100 cache: removed unneeded includes from add instance forms 2013-06-10 10:26:35 +12:00
Sam Hemelryk 89ad278957 MDL-39456 cachestore_file: added reference to global $CFG
By holding onto a reference of the global $CFG object we
can be sure that it isn't destroyed before we are done
with it.
This allows for caches to be used within destructors for
purposes such as delayed writes.
2013-05-24 09:51:06 +12:00
Damyon Wiese aa6d532b45 MDL-39602 cache: Move the includes for default stores
Putting them inside the function get_default_stores ensures
that they will be included from anywhere that calls get_default_stores.

Conflicts:

	cache/locallib.php
2013-05-10 11:55:35 +08:00
sam marshall e5bc3e3dde MDL-39472 MUC: Optimise cache::get_from_persist_cache 2013-05-08 10:17:58 +01:00
sam marshall 1df3b0ae24 MDL-39448 MUC: Memcache configurable key names 2013-05-07 11:44:11 +01:00
Dan Poltawski fc7f2b1a2f Merge branch 'MDL-39473-m24' of git://github.com/sammarshallou/moodle into MOODLE_24_STABLE 2013-05-06 14:33:02 +01:00
Dan Poltawski 0ddf951c15 MDL-39470 cache: added missing component to get_string call 2013-05-06 12:41:44 +01:00
sam marshall 0f491109ca MDL-39472 MUC: Improve parse_key performance 2013-05-02 16:00:09 +01:00
Tim Hunt 2ec2d00dc8 MDL-39445 get_plugin_list clean_param use is slow
get_plugin_list was calling clean_param($pluginname, PARAM_PLUGIN) a
lot (600+ times per page), and that is much slower than you would guess.
A specific function for this case, (which we then also use from
clean_param) is a performance win.
2013-05-02 15:47:28 +01:00
Sam Hemelryk 6318a38885 MDL-38565 cache: tidy up pre-integration
Conflicts:
	lib/db/upgrade.php
2013-04-19 10:11:38 +12:00
Sam Hemelryk 1a038ed7d9 MDL-38565 cache: improve stats gathering 2013-04-19 10:11:37 +12:00
Sam Hemelryk 312ad653e9 MDL-38565 cache: upgrade code to amend default stores
Conflicts:
	version.php
2013-04-19 10:11:37 +12:00
Sam Hemelryk 73433c0995 MDL-38565 cache: cron routine to clean up old session data 2013-04-19 10:09:55 +12:00
Sam Hemelryk 2e0b7de1b1 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.

Conflicts:
	cache/README.md
	cache/tests/cache_test.php
2013-04-19 10:09:55 +12:00
Sam Hemelryk bf07f4e212 MDL-38387 cache: removed call to plugins API from cache API 2013-03-20 16:07:53 +13:00
Sam Hemelryk 7588627b8b MDL-38350 cache: fixed issue with siteidentifier === false 2013-03-20 16:07:53 +13:00
Damyon Wiese ea8393591f Merge branch 'wip-MDL-38303-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-03-14 15:32:34 +08:00
Sam Hemelryk 95d3b8e1f2 MDL-38387 cache: fixed inifinite initialisation loop with site id 2013-03-10 11:31:58 +13:00
Sam Hemelryk d55276ee51 MDL-38303 cache: fixed purging of session cache when switching users 2013-03-10 11:31:38 +13:00
Damyon Wiese c23f9efc64 Merge branch 'wip-MDL-37935-m24' of git://github.com/samhemelryk/moodle into MOODLE_24_STABLE 2013-03-05 13:07:19 +08:00