Warning | ||
---|---|---|
| ||
Updating the course for FarCry 6.x. If you can help let us know! Put your notes in the comments for the page. Section should include discussion of:
|
Objectives
Excerpt |
---|
By the end of this unit you will be able to apply caching to various aspects of your applications to dramatically increase performance. |
...
In addition to specific database calls, the Object Broker can also manage caching of all views. Remember a view or webskin is like a fragment of output, such as HTML. Generally a page request is made up of one or more views. The Object Broker's webskin cache will keep track of embedded views, flushing all the related 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.
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 BrokerThe Object Broker is activated by adding component level metadata to your content type.
bObjectBrokerSetting this to objectBrokerMaxObjectsThe maximum number of objects to be held in the Broker for this content type. The default if you do not specify this attribute is Object Broker ReportYou 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 TypesLet's activate the Broker for the three content types we created earlier; superHero, superGroup and superPower.
View CachingYou can also cache the view layer very easily, by specifying a caching directive in the webskin's decorator.
Do not use |
...