2.0.3 • Published 5 years ago

clay-resource-cache v2.0.3

Weekly downloads
215
License
Apache-2.0
Repository
github
Last release
5 years ago

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')

{
  const cache = clayResourceCache({
    max: 1000,
    maxAge: 1000 * 60 * 60
  })

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

  cache.store(entity01)

  const 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

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago