1.1.3 • Published 3 years ago

typeorm-cache v1.1.3

Weekly downloads
95
License
MIT
Repository
github
Last release
3 years ago

Typeorm Cache

A typeorm cache provider based on keyv.

Installation

# npm
npm i typeorm-cache keyv --save

# or yarn
yarn add typeorm-cache keyv

Usage

import { createConnection } from 'typeorm'
import { KeyvCacheProvider } from 'typeorm-cache'

// In-memory cache
createConnection({
  // ... db config
  cache: {
    provider() {
      return new KeyvCacheProvider()
    }
  }
})

// Redis
createConnection({
  // ... db config
  cache: {
    provider() {
      return new KeyvCacheProvider('redis://user:pass@localhost:6379')
    }
  }
})

// ...

For more examples, visit keyv documentation.

License

MIT

Copyright (c) 2021, Acathur

1.1.1

3 years ago

1.1.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago