Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 14... Línea 14...
14
// You should have received a copy of the GNU General Public License
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
Línea 16... Línea 16...
16
 
16
 
Línea -... Línea 17...
-
 
17
namespace cachestore_redis;
-
 
18
 
17
namespace cachestore_redis;
19
use core_cache\definition;
18
 
20
 
19
/**
21
/**
20
 * TTL support test for Redis cache.
22
 * TTL support test for Redis cache.
21
 *
23
 *
Línea 39... Línea 41...
39
        if (!\cachestore_redis::are_requirements_met() || !defined('TEST_CACHESTORE_REDIS_TESTSERVERS')) {
41
        if (!\cachestore_redis::are_requirements_met() || !defined('TEST_CACHESTORE_REDIS_TESTSERVERS')) {
40
            $this->markTestSkipped('Could not test cachestore_redis. Requirements are not met.');
42
            $this->markTestSkipped('Could not test cachestore_redis. Requirements are not met.');
41
        }
43
        }
Línea 42... Línea 44...
42
 
44
 
43
        // Set up a Redis store with a fake definition that has TTL set to 10 seconds.
45
        // Set up a Redis store with a fake definition that has TTL set to 10 seconds.
44
        $definition = \cache_definition::load('core/wibble', [
46
        $definition = definition::load('core/wibble', [
45
                'mode' => 1,
47
                'mode' => 1,
46
                'simplekeys' => true,
48
                'simplekeys' => true,
47
                'simpledata' => true,
49
                'simpledata' => true,
48
                'ttl' => 10,
50
                'ttl' => 10,