In home I cfoutput the value: prc.whitelabel.client
The first time I enter home it outputs: 'DOMAINVALUE' as it should,
same for the subdomain, the first time I enter it outputs:
'SUBDOMAINVALUE'
But if I return to my interceptor and change either the domainvalue or
the subdomainvalue, and refresh the home, it shows the previous value,
not the new one, if I add ?fwreinit=true the new value shows up, but
I though that the preProcess intercepts everything first , right?
Is this the way preProcess should be working? or somehow is getting
cache?
As far as I know, OnRequestCapture is the only point in the request
lifecycle that happens before cacheBox does its thing; anything after that,
and it's too late - it gets cached.
Bear in mind, that anything you add into the RC within OnRequestCapture,
will alter the hashed RC - so you get a different cached event.
Really, from looking at your code (and being presumptuous) I'd put your
whiteLabel struct into the RC - not the PRC. The PRC doesn't get hashed, and
therefore both sites will use the same cached key and see the same thing -
if that's not what you want, then I'd use the RC instead.
If you put your whiteLabel struct into the RC, the cached key will be
different for all sites/subdomains, and they'll basically see different
cached versions of the pages - essentially sandboxing the cache for the
different domains.
Sorry, Im not very good explaining myself,
Yes and No, I crate the intercetor method onRequestCapture, it works
fine as in preProcess
the same issue (which probabbly it is not) is happening,
If I change values in rc.whitelabel.client, it does keep using the
previous instead until I use fwreinit
but since, that value it will never change since it will be a constant
for each subdomain. It will work.
I found strange that rc.whitelabel.client in either onRequestCapture
or preProcess, do not reflect change suntil using fwreinit, but
probabbly, that is how it should be, don't know.
If you are caching the view (i.e event.setview(view="myview", cache=true) -
it will *always* cache unless you set a cacheprefix for the view
specifically, for instance event.setView(view="myview", cache=true,
cacheprefix="#rc.whitelabel.client#").
If you are caching the event itself, it will use what's in the rc to create
the cachekey. Essentially, event caching creates the cachekey by doing
hash(serializeJSON(toString(rc))) - so the cache key would change as soon as
a variable is added into the RC.