23 const DEFAULT_BOOT_CACHE_TTL = 3600;
30 const DEFAULT_BOOTDATA_PLUGIN_SETTINGS_LIMIT = 40;
38 $this->cache = $cache;
61 if (
$config->boot_cache_ttl === null) {
62 $config->boot_cache_ttl = self::DEFAULT_BOOT_CACHE_TTL;
64 if (
$config->bootdata_plugin_settings_limit === null) {
65 $config->bootdata_plugin_settings_limit = self::DEFAULT_BOOTDATA_PLUGIN_SETTINGS_LIMIT;
67 if (
$config->simplecache_enabled === null) {
68 $config->simplecache_enabled =
false;
70 if (
$config->system_cache_enabled === null) {
71 $config->system_cache_enabled =
false;
73 if (
$config->simplecache_lastupdate === null) {
74 $config->simplecache_lastupdate = 0;
76 if (
$config->min_password_length === null) {
77 $config->min_password_length = 6;
79 if (
$config->minusername === null) {
82 if (
$config->batch_run_time_in_secs === null) {
83 $config->batch_run_time_in_secs = 4;
92 $config->mergeValues($services->configTable->getAll());
102 throw new \RuntimeException(
'The site secret is not set.');
106 $installed = isset(
$config->installed);
109 $this->timer->begin([__CLASS__ .
'::getBootData']);
120 throw new \RuntimeException(
'Before installation, config->site must have an unsaved ElggSite.');
130 $services->privateSettingsCache->save(
$guid, $entity_settings);
134 $services->dataCache->metadata->save($guid,
$metadata);
137 $services->plugins->setBootPlugins(
$data->getActivePlugins(),
false);
141 $services->logger->setLevel($debug);
143 if (
$config->system_cache_enabled) {
144 $config->system_cache_loaded =
false;
146 if ($services->views->configureFromCache($services->systemCache)) {
147 $config->system_cache_loaded =
true;
152 $services->translator->bootTranslations();
161 $this->cache->clear();
182 $config->_boot_cache_hit =
false;
185 if ($config->boot_cache_ttl > 0) {
186 $data = $this->cache->load(
'boot_data');
192 if ($config->boot_cache_ttl && $installed) {
193 $this->cache->save(
'boot_data',
$data, $config->boot_cache_ttl);
196 $config->_boot_cache_hit =
true;
boot(ServiceProvider $services)
Boots the engine.
if(!$enabled) if(PHP_SAPI!== 'cli')
Interates through each element of an array and calls callback a function.
if(elgg_trigger_plugin_hook('usersettings:save', 'user', $hooks_params, true)) foreach($request->validation() ->all() as $item) $data
$guid
Removes an admin notice.
invalidateCache()
Invalidate the cache item.
trait Profilable
Make an object accept a timer.
$config
Advanced site settings, debugging section.
setValue($name, $value)
Set a value to be returned without modification.
__construct(ElggCache $cache)
Cache.
trait Cacheable
Utility trait for injecting cache.
_elgg_config()
Get the Elgg config service.
Boots Elgg and manages a cache of data needed during boot.
Serializable collection of data used to boot Elgg.
_elgg_services()
Get the global service provider.