Cortex Caching Prerequisites

Cortex Caching Prerequisites

@Component Repositories

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

Ensure that your repository is located in package following the naming pattern:
*.integration.epcommerce.repository, where * is any
prefix. For example,
com.elasticpath.rest.resource.integration.epcommerce.repository would
be an appropriate package.

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 com.elasticpath.rest,
then the package name must be added to the
<context:component-scan/> element in
resources\OSGI-INF\blueprint\ext-applicationContext-repositories-integration.xml: