2.2.3 • Published 4 years ago

sequelize-transparent-cache-variable v2.2.3

Weekly downloads
445
License
CC-BY-4.0
Repository
github
Last release
4 years ago

sequelize-transparent-cache-variable

Variable adaptor for sequelize-transparent-cache.

Stores sequelize objects in variable. Useful for debugging purposes.

Warning: Do not use this adaptor in production, unless you know what you doing.

Example usage

const VariableAdaptor = require('sequelize-transparent-cache-variable')
const variableAdaptor = new VariableAdaptor({
  store: {} // optional
})

Constructor arguments

ParamTypeRequiredDescription
storeobjectnoObject to store sequelize instances

Storing format

Each object stored as is, keyed by id (Primary Key).

adaptor.set(['modelName', 'objectId']);

store structure:

{
  "modelName": {
    "objectId": {...}
  }
}

If object has multiple primary keys, object will be stored as is, keyed by concatenated Ids separated by comma.

adaptor.set(['modelName', 'objectId1', 'objectId2']);

store structure will be:

{
  "modelName": {
    "objectId1,objectId2": {...}
  }
}

For more info see sequelize-transparent-cache

2.2.3

4 years ago

2.2.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago