Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Cortex Caching Prerequisites

Cortex Caching Prerequisites

To enabling caching, ensure your repository class meets the following prerequisites.

@Component Repositories

Most repositories use the @Component annotation. To enable request-scoped caching on repositories, ensure the following prerequisites are met:

  1. Ensure that your repository is located in package following the naming pattern: *.integration.epcommerce.repository, where * is any prefix. For example, would be an appropriate package.
  2. Ensure that your repository's class name ends with RepositoryImpl. For example, CarsRepositoryImpl.

Cortex caches on runtime for @Component annotated repositories.

@Named Legacy Repositories

Legacy repositories using the @Named annotation require the steps described for @Component annotated repositories, as well as the following requirements:

If the package name does not start with, then the package name must be added to the <context:component-scan/> element in resources\OSGI-INF\blueprint\ext-applicationContext-repositories-integration.xml:

<context:component-scan base-package="my.pkg.with.custom.repos" scope-resolver="org.springframework.context.annotation.Jsr330ScopeMetadataResolver"/commerce-legacy/>

When adding multiple packages to <context:component-scan/>, the values should be comma separated:

<context:component-scan base-package="my.pkg.with.custom.repos,my.pkg.with.custom.repos2" scope-resolver="org.springframework.context.annotation.Jsr330ScopeMetadataResolver"/commerce-legacy/>

Cortex caches at load time for @Named annotated repositories.