File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
sandbox/cache-example/src Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111 RestExplorerComponent ,
1212} from '@loopback/rest-explorer' ;
1313import { ServiceMixin } from '@loopback/service-proxy' ;
14- import { CachePluginComponent } from '@sourceloop/cache' ;
14+ import { CachingComponent } from '@sourceloop/cache' ;
1515import path from 'path' ;
1616import { MySequence } from './sequence' ;
1717
@@ -35,7 +35,7 @@ export class CacheExampleApplication extends BootMixin(
3535 } ) ;
3636 this . component ( RestExplorerComponent ) ;
3737
38- this . component ( CachePluginComponent ) ;
38+ this . component ( CachingComponent ) ;
3939
4040 this . projectRoot = __dirname ;
4141 // Customize @loopback /boot Booter Conventions here
Original file line number Diff line number Diff line change 44// https://opensource.org/licenses/MIT
55import { Constructor , Getter , inject } from '@loopback/core' ;
66import { DefaultCrudRepository } from '@loopback/repository' ;
7- import { CacheManager } from '@sourceloop/cache' ;
7+ import { CacheMixin } from '@sourceloop/cache' ;
88import { CacheDbDataSource , DbDataSource } from '../datasources' ;
99import { Product } from '../models' ;
1010
11- export class ProductRepository extends CacheManager . CacheRepositoryMixin <
11+ export class ProductRepository extends CacheMixin <
1212 Product ,
1313 typeof Product . prototype . id ,
1414 { } ,
1515 Constructor < DefaultCrudRepository < Product , typeof Product . prototype . id , { } > >
16- > ( DefaultCrudRepository , {
17- prefix : 'product' ,
18- ttl : 50000 ,
19- } ) {
16+ > ( DefaultCrudRepository ) {
2017 redisDataSource : CacheDbDataSource ;
2118 constructor (
2219 @inject ( 'datasources.db' ) readonly dataSource : DbDataSource ,
You can’t perform that action at this time.
0 commit comments