# seneca-redis-store

> Redis storage layer for Seneca framework

Latest version **1.1.0** (published 2016-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install seneca-redis-store
pnpm add seneca-redis-store
yarn add seneca-redis-store
bun add seneca-redis-store
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-08-26 |
| First published | 2013-07-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+11 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Marius Ursache |
| Maintainers | marcopiraccini, mihaidma, nherment, pelger, rjrodger |
| Keywords | seneca, data, store, redis, plugin |

## Links

- npm: https://www.npmjs.com/package/seneca-redis-store
- Repository: https://github.com/senecajs/seneca-redis-store
- Issues: https://github.com/senecajs/seneca-redis-store/issues
- npm.io page: https://npm.io/package/seneca-redis-store

## Dependencies (4)

- [nosj](https://npm.io/package/nosj.md) 1.0.1
- [redis](https://npm.io/package/redis.md) 2.6.2
- [lodash](https://npm.io/package/lodash.md) 4.15.0
- [node-uuid](https://npm.io/package/node-uuid.md) 1.4.7

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2016-08-26
- 1.0.1 — 2016-08-02
- 1.0.0 — 2016-05-23
- 0.0.8 — 2015-09-11
- 0.0.7 — 2015-09-11
- 0.0.6 — 2014-04-04
- 0.0.5 — 2014-03-19
- 0.0.3 — 2013-07-31

## README

![Seneca](http://senecajs.org/files/assets/seneca-logo.png)
> A [Seneca.js][] data storage plugin

# seneca-redis-store
[![npm version][npm-badge]][npm-url]
[![Build Status][travis-badge]][travis-url]
[![Coveralls][BadgeCoveralls]][Coveralls]
[![Dependency Status][david-badge]][david-url]
[![Gitter][gitter-badge]][gitter-url]

## Description

A storage engine that uses [redis][redis-url] to persist data.

seneca-redis-store's source can be read in an annotated fashion by,

- running `npm run annotate`
- viewing [online](http://senecajs.github.io/seneca-redis-store/doc/redis-store.html).

The annotated source can be found locally at `./doc/redis-store.html`.

If you're using this module, and need help, you can:

- Post a [github issue][],
- Tweet to [@senecajs][],
- Ask on the [Gitter][gitter-url].

If you are new to Seneca in general, please take a look at [senecajs.org][]. We have everything from
tutorials to sample apps to help get you up and running quickly.

### Seneca compatibility
Supports Seneca versions **1.x** - **3.x**

## Install
To install, simply use npm. Remember you will need to install [Seneca.js][] if you haven't already.

```
npm install seneca
npm install seneca-redis-store
```

You also need redis running locally. Please visit [redis][redis-url] for more info about how to install and run redis

## Quick Example

**String Uri**
```js
var opts = {
  'redis-store': 'redis://user:pass@host:port'
}
```

**String Uri with Redis Options**
```js
var opts = {
  'redis-store': {
    uri: 'redis://user:pass@host:port',
    options: {...}
  }
}

seneca.use('redis-store', opts);

seneca.ready(function() {
  var apple = seneca.make$('fruit')
  apple.name = 'Pink Lady'
  apple.price = 0.99
  apple.save$(function (err, apple) {
    console.log("apple.id = " + apple.id)
  })
})
```

See the full list of available [Redis options].

## Usage
You don't use this module directly. It provides an underlying data storage engine for the Seneca entity API:

```js
var entity = seneca.make$('typename')
entity.someproperty = "something"
entity.anotherproperty = 100

entity.save$(function (err, entity) { ... })
entity.load$({id: ... }, function (err, entity) { ... })
entity.list$({property: ... }, function (err, entity) { ... })
entity.remove$({id: ... }, function (err, entity) { ... })
```

## Contributing
The [Senecajs org][] encourage open participation. If you feel you can help in any way, be it with
documentation, examples, extra testing, or new features please get in touch.

## Test
To run tests, simply use npm:

```
npm run test
```

## License
Copyright (c) 2016, Marius Ursache and other contributors.
Licensed under [MIT][].

[npm-badge]: https://img.shields.io/npm/v/seneca-redis-store.svg
[npm-url]: https://npmjs.com/package/seneca-redis-store
[travis-badge]: https://travis-ci.org/senecajs/seneca-redis-store.svg
[travis-url]: https://travis-ci.org/senecajs/seneca-redis-store
[codeclimate-badge]: https://codeclimate.com/github/senecajs/seneca-redis-store/badges/gpa.svg
[codeclimate-url]: https://codeclimate.com/github/senecajs/seneca-redis-store
[Coveralls]: https://coveralls.io/github/senecajs/seneca-mem-store?branch=master
[BadgeCoveralls]: https://coveralls.io/repos/github/senecajs/seneca-mem-store/badge.svg?branch=master
[david-badge]: https://david-dm.org/senecajs/seneca-redis-store.svg
[david-url]: https://david-dm.org/senecajs/seneca-redis-store
[gitter-badge]: https://badges.gitter.im/Join%20Chat.svg
[gitter-url]: https://gitter.im/senecajs/seneca
[MIT]: ./LICENSE.txt
[Senecajs org]: https://github.com/senecajs/
[Seneca.js]: https://www.npmjs.com/package/seneca
[senecajs.org]: http://senecajs.org/
[redis-url]: http://redis.io/
[Redis options]: https://github.com/NodeRedis/node_redis#rediscreateclient
[github issue]: https://github.com/senecajs/seneca-redis-store/issues
[@senecajs]: http://twitter.com/senecajs

---
_Source: https://npm.io/package/seneca-redis-store · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
