Created
August 26, 2019 01:10
-
-
Save dmonllao/a2ad3c0983385b743a1b7526c89e21e2 to your computer and use it in GitHub Desktop.
static_acceleration_returns_references_to_obj.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('CLI_SCRIPT', true); | |
require_once(__DIR__ . '/config.php'); | |
$options = [ | |
'simpledata' => true, | |
'staticacceleration' => true | |
]; | |
$cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_myplugin', 'mycache', [], $options); | |
$modules = $DB->get_records('modules'); | |
$cache->set_many($modules); | |
$moduleone = $cache->get('1'); | |
var_dump($moduleone->name); | |
$moduleone->name = 'OUUU'; | |
var_dump($cache->get('1')->name); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment