Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

3.1.0: Module-Autoloader benutzt immer den Cache #5872

Closed
lbane opened this issue Jun 4, 2013 · 10 comments
Closed

3.1.0: Module-Autoloader benutzt immer den Cache #5872

lbane opened this issue Jun 4, 2013 · 10 comments
Labels
Milestone

Comments

@lbane
Copy link

lbane commented Jun 4, 2013

Datei system/modules/core/library/Contao/ClassLoader.php, Funktion scanAndRegister:

Die Variable $GLOBALS['TL_CONFIG']['bypassCache'] ist immer "false" (bzw. existiert [noch] nicht), so dass der Cache immer benutzt wird, sobald er einmal aktiviert war, unabhängig vom aktuellen Zustand der Einstellung "internen Cache umgehen".

@leofeyer
Copy link
Member

Behoben in c5b44fd.

@aschempp
Copy link
Member

Now we are loading the localconfig three times?

@leofeyer
Copy link
Member

Not happy with this either, but I did not find a better solution.

@aschempp
Copy link
Member

How about a static method in Config class called preload. It could set a static flag so we know not to initialize again. Also, the initialize.php should not know about the path of the config files...

@leofeyer
Copy link
Member

Config::preload() sounds like a good idea :)

@leofeyer
Copy link
Member

Changed in c381dd4. There is a minor catch though: you can no longer override the Config class in the new variant.

@aschempp
Copy link
Member

what if you don't create a class alias? Should it not be possible then?

@leofeyer
Copy link
Member

Theoretically, maybe, but wouldn't it be a great risk to use the core class for pre-initialization (preload()) and another class for the rest (initialize())? This seems kind of inconsistent to me.

@leofeyer
Copy link
Member

Never mind, it does not work anyway.

Fatal error: Cannot redeclare class Contao\Config

@aschempp
Copy link
Member

Well I'm not using the overwrite functionality anyways :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants