Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

The objectbroker cache is stored per application. In clustered solutions its possible for application instances to get out of synch. Daemon has a commercial plugin for the FarCry Platform to help provide high availability in clustered solutions: FarCry HA Plugin.

Activating Object Broker

The Object Broker is activated by adding component level metadata to your content type.

Code Block

<cfcomponent extends="farcry.core.packages.types.versions" displayname="Article"
  hint="Standard article used in the site."
  bObjectBroker="true"
  objectBrokerMaxObjects="10000">

bObjectBroker

Setting this to true activates object-level caching for the specific content type. The default if you do not specify this attribute is false.

objectBrokerMaxObjects

The maximum number of objects to be held in the Broker for this content type. The default if you do not specify this attribute is 100. Typically you want to set this to a number that is high enough to hold all the records for this content type. The only reason not to is if you lack enough physical memory on the ColdFusion instance to accommodate them.

Object Broker Report

You can check which content types have been activated for the Object Broker by running the Object Broker Report under the webtop Admin tab, Cache Management menu. This should indicate those content types using the Object Broker, their maximum threshold and the current number of objects in the Broker.

Walkthrough: Activating the Object Broker for Content Types

Let's activate the Broker for the three content types we created earlier; superHero, superGroup and superPower.

  1. Open your Super Group type (./packages/types/superGroup.cfc) and update the component metadata
    Code Block
    
    <cfcomponent
    	name="superGroup" extends="farcry.core.packages.types.types" output="false" displayname="Super Group"
    	bObjectBroker="true" objectBrokerMaxObjects="1000">
    
  2. Open your Super Hero type (./packages/types/superHero.cfc) and update the component metadata
    Code Block
    
    <cfcomponent
    	name="superHero" extends="farcry.core.packages.types.types" output="false" displayname="Super Hero"
    	bObjectBroker="true" objectBrokerMaxObjects="1000">
    
  3. Open your Super Power type (./packages/types/superPower.cfc) and update the component metadata
    Code Block
    
    <cfcomponent
    	name="superPower" extends="farcry.core.packages.types.types" output="false" displayname="Super Power"
    	bObjectBroker="true" objectBrokerMaxObjects="1000">
    
  4. Re-initialize the application to get your component changes registered in the application (ie. Update App!)
  5. Wander about the website clicking on a few pages; this will activate the Object Broker and start caching objects behind the scenes
  6. Open up the webtop Admin tab and review the Object Broker Report

View Caching

You can also cache the view layer very easily, by specifying a caching directive in the webskin's decorator.

Note
titlelObjectBrokerWebskins is Deprecated

Do not use lObjectBrokerWebskins in your content type component.This feature has been deprecated and should not be used. If you see it in your cfcomponent metadata you should remove it. Use the webskin decorator instead.

...