It's not uncommon to have a server which runs the deployer as well as the web site application. Let's say for the sake of argument that we have two web sites under IIS, each with it's own AppPool process. For this scenario, as the deployer's broker cache is in a different JVM than the web application's broker cache, you'd typically set up the cache channel service (CCS) to allow "dirtying" messages to go from the deployer to the web application.
On the deployer, you don't really want or need caching. All you're doing is pushing content out to the database storage, so you'd never serve anything from cache. It would be a waste of memory to have one, while of course, on your web application, you do want caching. My question is what is the best way to configure this. As I see it, there are three possible points of control:
Setting
<ObjectCache Enabled="false">
Using the @cached attribute on ItemTypes
<ItemTypes defaultStorageId="defaultDb" cached="false">
Restricting the memory available to the deployer's JVM
If I knew that all three of these would work equally well, I'd be inclined to set ObjectCache Enabled to false in the broker's storage configuration, and be done with it. This would mean that a single attribute would be the only difference between my two storage conf files, and I could manage that quite easily.
Unfortunately, for this to work, it would rely on the deployer's broker being sufficiently cache-aware to send dirtying messages to the CCS, even though the deployer itself isn't using caching. My confidence in this working is lessened by the fact that the configuration elements for RemoteSynchronization
are contained within the ObjectCache
element.
Although the configuration for ItemType caching is less obviously dismaying, the problem remains that to configure this correctly, you need knowledge of the internals. (RTFM links would also be welcome at this point :-) In any case, if you had various types configured differently, managing all the differences would be tiresome.
The JVM approach would presumably work, but in my view would be the least elegant of the three.
What is the correct approach?