Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning
titleDocumentation Incomplete

These are notes during the beta cycle only and are not complete – examples may not reflect best practice with respect to the final release of the 4.0 code base.

Broker Overview

The object broker is a super piece of caching technology for the integrated ORM of FarCry Core. In simple terms it speeds up the access to data in the database by only retrieving the data once, then using in memory storage to provide fast access for subsequent requests. You really want to turn this on. The goodness provided is only limited by the the memory available to your ColdFusion instance.

Objectbroker manages the population and refreshing of its cache. You don't really need to do anything more than activate the service for the specific content types you desire.

In addition to specific database calls, object broker can also manage caching of all views. A view is like a fragment of output, such as HTML. Generally a page request is made up of one or more views. Objectbrokers webskin cache will even keep track of embedded views, flushing all the relevant views whenever a relevant content item is changed. This ensures that your changes are directly reflected in the view without having to be involved in any complex cache management.

How to activate the ObjectBroker

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"
  lObjectBrokerWebskins="display*">

Object Broker Webtop Report

You can check which content types have been activated for the object broker by running the Objectbroker Report in the webtop Admin section. This should indicate those content types using the objectbroker, there maximum threshold and the current number of objects in the broker.

Image Added

Basic process flow

  1. on fourq.getData() calls
    • check typename.objectpool for UUID
      • if present
        • return struct
      • if not,
        • make dbgateway call
        • check if room in objectpool
        • purge/update aobjects FIFO list as required
        • update objectpool with object struct
        • return struct
      • update cache stats (no cache stats implemented at this time 20070505)
  2. return object struct to content type call exactly as per original

Object Broker Webtop Report

You can check which content types have been activated for the object broker by running the Objectbroker Report in the webtop Admin section. This should indicate those content types using the objectbroker, there maximum threshold and the current number of objects in the broker.

...

In memory structure of object broker

...