clay-resource-cache
Cache handler for clay-resources
Last updated 6 months ago by realglobe .
Apache-2.0 · Repository · Bugs · Original npm · Tarball
$ cnpm install clay-resource-cache 
SYNC missed versions from official npm registry.

clay-resource-cache

Build Status npm Version JS Standard

Cache handler for clay-resources

Installation

$ npm install clay-resource-cache --save

Usage

'use strict'

const clayResourceCache = require('clay-resource-cache')
const clayEntity = require('clay-entity')

{
  let cache = clayResourceCache({
    maxSize: 1000,
    bufferSize: 100
  })

  let entity01 = clayEntity({
    name: 'The entity 01'
  })

  cache.store(entity01)

  let cached = cache.get(entity01.id)
  console.log(cached) // Get cached entity
}

API Guide

License

This software is released under the Apache-2.0 License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 4
Last Month 0
Dependencies (1)
  • co ^4.6.0
Dev Dependencies (18)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |