New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

loopback-cache

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loopback-cache

Cache solutions for Loopback

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by66.67%
Maintainers
1
Weekly downloads
 
Created
Source

loopback-cache

Build Status Coverage Status

Cache solutions for Loopback.

How to use

Install

npm install loopback-cache --save

Config

To load the mixins.

# model-config.json
{
  "_meta": {
    ...
    "mixins": [
      ...
      "loopback-cache/mixins",
      ...
    ]
  },
  ...
}

To use the redis backend, setup a model using the redis connector and use the mixin CacheModel with the model. The TTL is in seconds, see http://redis.io/commands/expire.

# The model JSON
{
  ...
  "mixins": {
    "CacheModel": {
      "backend": "redis",
      "ttl": 3600
    }
  },
  ...
}

To use the couchbase backend, setup a model using the couchbase3 connector and use the mixin CacheModel with the model. The TTL is in seconds usually but also has a special case, see http://docs.couchbase.com/sdk-api/couchbase-node-client-2.1.2/Bucket.html#touch.

# The model JSON
{
  ...
  "mixins": {
    "CacheModel": {
      "backend": "couchbase",
      "ttl": 3600
    }
  },
  ...
}

Git Summary

 project  : loopback-cache
 repo age : 3 months
 active   : 12 days
 commits  : 33
 files    : 14
 authors  :
    20  CCharlieLi   60.6%
    11  Makara Wang  33.3%
     2  fraserxu     6.1%

Keywords

FAQs

Package last updated on 18 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc