As of today we can set the priority for the cache warmers, this is
very cool as we can run:

- The template cache warmer first (priority = 20),
- Then the assetic cache warmer (priority = 10),
- The router cache warmer at the end (priority not specified, 0 by
default)

Specifying absolute priorities could be a problem:

- When creating a new bundle and need to assign a priority,
- I am pretty sure I won't remember why the assetic priority is 10 is
one month from now !
- Some priority are hard-coded and could not be modified easily...

Q1) Do you think using absolute priorities could be an issue wrt to
future extensions ?

If this is an issue, then a solution could be to add the ability for
each warmer to specify when it should be executed.
i.e. assetic should run AFTER template and BEFORE router.

Then you don't need to tweak your priorities by hand when adding a new
bundle and you know the expected behavior:
"assetic should run AFTER template and BEFORE router" vs "assetic has
a priority of 10"

Q2) What do you think about the solution of adding "AFTER" & "BEFORE"
constraints ? (or can you imagine something better)

If this should be implemented then we need to work on the details:
- Does anybody know (or want to create) an algorithm which could
convert AFTER / BEFORE constraints to an absolute order ?
- Should this be implemented in the config files & compiler or in the
warmer classes & maybe the CacheWarmerAggregate could become a
CacheWarmerManager ?
- ...

Cheers,
Victor

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to