[wix-devs] 5125 - Force cache if already present
r.sean.hall at gmail.com
Sun Mar 14 11:29:07 PDT 2021
(starts at 6:00)
The implementation of #5125 is pretty straightforward - force the package
to be cached if the request state > BOOTSTRAPPER_REQUEST_STATE_ABSENT.
As part of the work I did for #6297 in v4, I changed the implementation of
Cache="always" (https://github.com/wixtoolset/issues/issues/4329) to rely
on the request state of the package so that the BA could opt out of caching
a package. What I've come to realize is that as described in #5125, there
are cases where the engine will not cache the package even though the
package was requested as present. And contrary to what was said in the
meeting (and transcribed into the meeting notes), there has never been a
way for the BA to request that a package be cached even though there are no
actions for the package in the plan. So I think we need to add a
fForceCache parameter to OnPlanPackageBegin that exposes the force cache
functionality so the BA has a way to override it.
I'm not sure how the functionality for #5125 should be exposed. There are
really two separate concepts currently in the Cache attribute - whether the
package should be kept in the cache and when to cache the package. People
continue to be confused about what Cache="no" means, so maybe we should
split it up like I originally did in the first implementation of #4329.
Here are some ideas:
1. Cache can be no, yes, ifPresent (#5125), always.
2. Cache can be transient or alwaysClean ("no"), default or lazy ("yes"),
eager or proactive (#5125), always.
3. Change Cache="no" to CleanCache="always", default is
CleanCache="default". Change Cache="yes" to Cache="default", keep "always",
add new one for #5125.
Some other names that were proposed: forRepair, repair, stage, ifUseable,
More information about the wix-devs