mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
![]() 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. |
||
---|---|---|
.. | ||
file | ||
memcache | ||
memcached | ||
mongodb | ||
session | ||
static |