2.0.10 • Published 6 days ago

lb4-cache v2.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

lb4-cache

This is a small cli tool to add caching to controllers created in a LoopBack 4 app. At this point, the CLI only works for OpenAPI based contrllers created with lb4 openapi.

Installing

npm install lb4-cache -g

Prerequisites

  • Run the cli in a LoopBack 4 project.
  • Run the cli after the OpenAPI based controllers are created using lb4 openapi

How to run

  • With default options: lb4-cache --redisDS redisDataSource --specURL 'http://localhost:3000/openapi.json'
  • With custom options: lb4-cache --prefix openapi --redisDS redisDataSource --cacheTTL 60000 --specURL 'http://localhost:3000/openapi.json'

Options

--redisDS: pass redis datasource generated with lb4 datasource. This is a required parameter.
--cacheTTL: Pass ttl (in miliseconds) for caching. Default is 60 seconds. 
--specURL: URL to open api specs. This is requried parameter.
--prefix: prefix passed to lb4 openapi. Default is 'openapi'
--readonly: Only GET APIs. Default is false
--exclude: A regex (e.g. products/*) to exclude APIs to add caching to.
--include: A regex (e.g. products/*) to include APIs to add caching to.
2.0.10

6 days ago

2.0.7

1 month ago

2.0.9

1 month ago

2.0.8

1 month ago

2.0.6

2 months ago

2.0.5

2 months ago

2.0.4

5 months ago

2.0.3

5 months ago

2.0.2

5 months ago

2.0.1

6 months ago

2.0.0

6 months ago

1.0.9

12 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.13

11 months ago

1.0.8

12 months ago

1.0.7

12 months ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago