@aaqilniz/rest-cache
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

rest-cache

LoopBack

Installation

Install RestCacheComponent using npm;

$ [npm install | yarn add] @aaqilniz/rest-cache

Basic Use

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

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

Package Sidebar

Install

npm i @aaqilniz/rest-cache

Weekly Downloads

34

Version

2.0.0

License

none

Unpacked Size

21.2 kB

Total Files

43

Last publish

Collaborators

  • aaqilniz