loopback-rest-cache
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

loopback-rest-cache

LoopBack

Installation

Install LoopbackRestCacheComponent using npm;

$ [npm install | yarn add] loopback-rest-cache

Basic Use

Configure and load LoopbackRestCacheComponent in the application constructor as shown below.

import {LoopbackRestCacheComponent, LoopbackRestCacheComponentOptions, DEFAULT_LOOPBACK_REST_CACHE_OPTIONS} from 'loopback-rest-cache';
// ...
export class MyApplication extends BootMixin(ServiceMixin(RepositoryMixin(RestApplication))) {
  constructor(options: ApplicationConfig = {}) {
    const opts: LoopbackRestCacheComponentOptions = DEFAULT_LOOPBACK_REST_CACHE_OPTIONS;
    this.configure(LoopbackRestCacheComponentBindings.COMPONENT).to(opts);
      // Put the configuration options here
    });
    this.component(LoopbackRestCacheComponent);
    // ...
  }
  // ...
}

Package Sidebar

Install

npm i loopback-rest-cache

Weekly Downloads

1

Version

1.0.1

License

none

Unpacked Size

23.2 kB

Total Files

45

Last publish

Collaborators

  • aaqilniz