[ http://jira.magnolia.info/browse/MAGNOLIA-1853?page=comments#action_15100 
] 
            
Grégory Joseph commented on MAGNOLIA-1853:
------------------------------------------

> mh.. shouldn't this be: "custom module" will always be started AFTER "cache 
> module". 
Woops, yes, indeed.

OTOH, (if that's not already the case, it should be), the CacheManager should 
observe its config and reload on change. (But I agree it's ugly and non-optimal 
to have it restart - if I'm not wrong though, observation is only triggered 
after a save, not after operations, which would mean, if we had a single save 
upon modules startup, that the CacheManager would reload its config only once.

Can you elaborate a bit more on your use case: why (based on what?) does your 
module have to change the cache config at startup (and not during the rest of 
the lifetime of the app?)

Have you had a look at 
ModuleLifecycleContext.registerModuleObservingComponent(), the start() method 
of its implementation and how it is used ? Maybe that or a similar callback 
mechanism could be used to implement what you need.

Somehow, this makes me think about MAGNOLIA-1663, where we wanted to avoid 
multiple/useless reloading of observing components during install.

The "pre-startup" phase also sounds reasonable, but I'm afraid we'll need a 
pre-pre-startup phase, a post-startup phase and so on and so forth.



> ModuleLifecycle : allow usage of the Task api and global save/rollback
> ----------------------------------------------------------------------
>
>                 Key: MAGNOLIA-1853
>                 URL: http://jira.magnolia.info/browse/MAGNOLIA-1853
>             Project: Magnolia
>          Issue Type: Task
>          Components: core
>            Reporter: Grégory Joseph
>         Assigned To: Grégory Joseph
>             Fix For: Green
>
>
> This is currently implemented through startupTasks, but using the 
> ModuleLifecycle is more relevant, since startup tasks are not related to any 
> given version of a module

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------

Reply via email to