Broadleaf Microservices
  • v1.0.0-latest-prod

Content Services Configuration Properties

This document covers the miscellaneous configuration properties used by the Content Services.

Content Cache Properties

All content cache properties are related to the time-to-live for each cache. The defaults are 5 minutes. These are all also to facilitate caching when resolving Content Items in the various possible ways.

  • broadleaf.content.cache.by-model-name: Caches results when looking up a Content Model by name.

  • broadleaf.content.cache.by-model-uri: Caches results when looking up a Content Model by uri.

  • broadleaf.content.cache.by-item-name: Caches results when looking up a Content Item by name.

  • broadleaf.content.cache.by-item-id-in: Caches results when looking up Content Items by multiple context Ids.

  • broadleaf.content.cache.by-item-name-in: Caches results when looking up Content Items by multiple names.

  • broadleaf.content.cache.by-item-uri-and-model-id: Caches results when looking up a Content Item by URI and a Model Id.

  • broadleaf.content.cache.page-by-item-name-in: Caches results when looking up a page of Content Items by multiple names.

  • broadleaf.content.cache.page-by-item-id-in: Caches results when looking up a page of Content Items by multiple context Ids.

  • broadleaf.content.cache.page-by-item-model-id: Caches results when looking up a page of Content Items by their Model Id.

  • broadleaf.content.cache.by-item-and-model-uri: Caches results when looking up a Content Item by a combined Model and Item URI.

  • broadleaf.content.cache.all-items-by-model-id: Caches results when looking up Content Items by a Model’s Id.

  • broadleaf.content.cache.all-items-by-filter: Caches results when looking up Content Items with an RSQL filter.

  • broadleaf.content.cache.all-items-with-tags: Caches results when looking up Content Items with tags.

  • broadleaf.content.cache.by-zone-name: Caches results when looking up a Content Zone by name.

  • broadleaf.content.cache.by-content-item-id: Caches results when hydrating a Content Item.

Content Cache Invalidation (since 2.0.5)

To enable cache invalidation message flow, set broadleaf.content.cache.invalidation.active=true.

When updating an entity, a message is sent to invalidate the entity cache for discrete cache invalidation. Cache invalidation for each entity can be invalidated partially or can require a full eviction of the entity cache depending on the reset property specified on the event message. Cache invalidation can also be influenced by the ability to delay cache event messages for a time, as defined by the message send delay properties.

Table 1. Properties that influence cache invalidation message settings for the content service.
Name Description Default

broadleaf.content.cache.invalidation.active

Whether or not to enable the cache invalidation messaging flow in content services.

false

broadleaf.content.cache.invalidation.content-item-cache-invalidation-message-send-delay

Amount of time to delay the sending of the content item cache invalidation message.

0 minutes

broadleaf.content.cache.invalidation.content-zone-cache-invalidation-message-send-delay

Amount of time to delay the sending of the content zone cache invalidation message.

0 minutes

broadleaf.content.cache.invalidation.content-model-cache-invalidation-message-send-delay

Amount of time to delay the sending of the content model cache invalidation message.

0 minutes

broadleaf.content.cache.invalidation.field-data-cache-invalidation-message-send-delay

Amount of time to delay the sending of the field data cache invalidation message.

0 minutes

broadleaf.content.cache.invalidation.content-field-cache-invalidation-message-send-delay

Amount of time to delay the sending of the content field cache invalidation message.

0 minutes

broadleaf.content.cache.invalidation.content-folder-item-cache-invalidation-message-send-delay

Amount of time to delay the sending of the content folder item cache invalidation message.

0 minutes

broadleaf.content.cache.invalidation.starred-item-cache-invalidation-message-send-delay

Amount of time to delay the sending of the starred item cache invalidation message.

0 minutes

broadleaf.content.cache.invalidation.notification.*

See com.broadleafcommerce.common.messaging.notification.NotificationProperties for the full list of options.

broadleaf.content.cache.invalidation.retry.*

See com.broadleafcommerce.common.messaging.notification.RetryProperties for the full list of options.

Provider Properties

These properties are for configuring the data source and are essentially the same as for any other service with a backing data store.

General Data Source

This exposes all of the Spring DataSourceProperties under broadleaf.content.datasource. This is to allow the regular property structure to be restricted to a specific Broadleaf data route.

Liquibase

This exposes all of the Spring LiquibaseProperties under broadleaf.content.liquibase. This is to allow the regular property structure to be restricted to a specific Broadleaf data route.

JPA

This exposes all of the Spring JpaProperties under broadleaf.content.jpa in addition to the Spring HibernateProperties under broadleaf.content.jpa.hibernate. This is to allow the regular property structure to be restricted to a specific Broadleaf data route.

Delegating Data Source

These are additional properties that define datasource configuration that employs SchemaDelegatingDataSource. This allows through configuration alone a setup that declares multiple datasources (each tied to a schema) backed by a common base datasource. This config is generally employed as part of a flex-package installation where multiple services run together in a single JVM.

  • broadleaf.content.delegating.schema: The schema that borrowed connections should be initialized to in SchemaDelegatingDataSource.

  • broadleaf.content.delegating.delegateRef: The back-reference to another section of configuration that fully describes the base datasource backing the SchemaDelegatingDataSource.