Skip to content

Commit

Permalink
chore(release): 1.0.2 🚀 [skip ci]
Browse files Browse the repository at this point in the history
## [1.0.2](v1.0.1...v1.0.2) (2023-05-02)
  • Loading branch information
semantic-release-bot committed May 2, 2023
1 parent 20aeee7 commit b21dac0
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 60 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## [1.0.2](https://github.com/bbeesley/bags-of-cache/compare/v1.0.1...v1.0.2) (2023-05-02)

## [1.0.1](https://github.com/bbeesley/bags-of-cache/compare/v1.0.0...v1.0.1) (2023-01-12)

# 1.0.0 (2023-01-12)
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ const second = await memoised('one'); // this will be returned from the cache

#### CacheingClient

[src/cacheing-client.ts:16-107](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L16-L107 "Source code on GitHub")
[src/cacheing-client.ts:16-107](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/cacheing-client.ts#L16-L107 "Source code on GitHub")

Base client used to create clients with in memory caches

##### get

[src/cacheing-client.ts:46-49](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L46-L49 "Source code on GitHub")
[src/cacheing-client.ts:46-49](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/cacheing-client.ts#L46-L49 "Source code on GitHub")

Gets an item in the cache

Expand All @@ -90,7 +90,7 @@ Returns **any** {\*}

##### memoise

[src/cacheing-client.ts:59-71](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L59-L71 "Source code on GitHub")
[src/cacheing-client.ts:59-71](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/cacheing-client.ts#L59-L71 "Source code on GitHub")

Memoises an arbitrary function using the cache

Expand All @@ -102,7 +102,7 @@ Returns **any** {T} Memoised version of the function

##### set

[src/cacheing-client.ts:81-85](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L81-L85 "Source code on GitHub")
[src/cacheing-client.ts:81-85](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/cacheing-client.ts#L81-L85 "Source code on GitHub")

Sets an item in the cache

Expand All @@ -116,15 +116,15 @@ Returns **void** 

##### stop

[src/cacheing-client.ts:92-94](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L92-L94 "Source code on GitHub")
[src/cacheing-client.ts:92-94](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/cacheing-client.ts#L92-L94 "Source code on GitHub")

Empties the cache

Returns **void** 

##### createCacheKey

[src/cacheing-client.ts:104-106](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L104-L106 "Source code on GitHub")
[src/cacheing-client.ts:104-106](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/cacheing-client.ts#L104-L106 "Source code on GitHub")

Util to serialise stuff to use as a cache key

Expand Down Expand Up @@ -189,39 +189,39 @@ const item = await client.getItem({

#### emptyResponseCacheTime

[src/dynamo-client.ts:23-23](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L23-L23 "Source code on GitHub")
[src/dynamo-client.ts:23-23](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/dynamo-client.ts#L23-L23 "Source code on GitHub")

When we get no items back from a query we will not retry the query within this time (ms)

Type: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)

#### queryConcurrency

[src/dynamo-client.ts:30-30](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L30-L30 "Source code on GitHub")
[src/dynamo-client.ts:30-30](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/dynamo-client.ts#L30-L30 "Source code on GitHub")

Limit concurrently sent queries to this value

Type: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)

#### getConcurrency

[src/dynamo-client.ts:37-37](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L37-L37 "Source code on GitHub")
[src/dynamo-client.ts:37-37](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/dynamo-client.ts#L37-L37 "Source code on GitHub")

Limit concurrent getItem calls to this value

Type: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)

#### DynamoCachedClient

[src/dynamo-client.ts:47-173](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L47-L173 "Source code on GitHub")
[src/dynamo-client.ts:47-173](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/dynamo-client.ts#L47-L173 "Source code on GitHub")

**Extends CacheingClient**

Client for dynamo tables. Makes dynamo requests and caches the results.

##### getItem

[src/dynamo-client.ts:82-109](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L82-L109 "Source code on GitHub")
[src/dynamo-client.ts:82-109](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/dynamo-client.ts#L82-L109 "Source code on GitHub")

Gets a single item from the table by key and caches the result

Expand All @@ -233,7 +233,7 @@ Returns **any** {(Promise\<T | undefined>)}

##### query

[src/dynamo-client.ts:119-133](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L119-L133 "Source code on GitHub")
[src/dynamo-client.ts:119-133](https://github.com/bbeesley/bags-of-cache/blob/20aeee7c10b85b8cb47da9fb0c9fc33e86e5b444/src/dynamo-client.ts#L119-L133 "Source code on GitHub")

Sends an arbitrary dynamo query, cacheing the results

Expand Down
81 changes: 41 additions & 40 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
@beesley/bags-of-cache - v1.0.0 / [Modules](modules.md)
@beesley/bags-of-cache - v1.0.1 / [Modules](modules.md)

# @beesley/bags-of-cache

[![Build, Test & Publish Main](https://github.com/bbeesley/bags-of-cache/actions/workflows/build-test-on-push.yml/badge.svg)](https://github.com/bbeesley/bags-of-cache/actions/workflows/build-test-on-push.yml) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)

This package contains in memory cache tools. A generic in memory cache class is available to be used by other tools.

- [@beesley/bags-of-cache](#beesleybags-of-cache)
- [Cached Client](#cached-client)
- [Caveats](#caveats)
- [Usage](#usage)
- [Client API](#client-api)
- [CacheingClient](#cacheingclient)
- [get](#get)
- [Parameters](#parameters)
- [memoise](#memoise)
- [Parameters](#parameters-1)
- [set](#set)
- [Parameters](#parameters-2)
- [stop](#stop)
- [createCacheKey](#createcachekey)
- [Parameters](#parameters-3)
- [Cached Dynamo Client](#cached-dynamo-client)
- [Caveats](#caveats-1)
- [Usage](#usage-1)
- [Dynamo API](#dynamo-api)
- [emptyResponseCacheTime](#emptyresponsecachetime)
- [queryConcurrency](#queryconcurrency)
- [getConcurrency](#getconcurrency)
- [DynamoCachedClient](#dynamocachedclient)
- [getItem](#getitem)
- [Parameters](#parameters-4)
- [query](#query)
- [Parameters](#parameters-5)
* [@beesley/bags-of-cache](#beesleybags-of-cache)
* [Cached Client](#cached-client)
* [Caveats](#caveats)
* [Usage](#usage)
* [Client API](#client-api)
* [CacheingClient](#cacheingclient)
* [get](#get)
* [Parameters](#parameters)
* [memoise](#memoise)
* [Parameters](#parameters-1)
* [set](#set)
* [Parameters](#parameters-2)
* [stop](#stop)
* [createCacheKey](#createcachekey)
* [Parameters](#parameters-3)
* [Cached Dynamo Client](#cached-dynamo-client)
* [Caveats](#caveats-1)
* [Usage](#usage-1)
* [Dynamo API](#dynamo-api)
* [emptyResponseCacheTime](#emptyresponsecachetime)
* [queryConcurrency](#queryconcurrency)
* [getConcurrency](#getconcurrency)
* [DynamoCachedClient](#dynamocachedclient)
* [getItem](#getitem)
* [Parameters](#parameters-4)
* [query](#query)
* [Parameters](#parameters-5)

## Cached Client

Expand Down Expand Up @@ -73,13 +74,13 @@ const second = await memoised('one'); // this will be returned from the cache

#### CacheingClient

[src/cacheing-client.ts:16-107](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/cacheing-client.ts#L16-L107 "Source code on GitHub")
[src/cacheing-client.ts:16-107](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L16-L107 "Source code on GitHub")

Base client used to create clients with in memory caches

##### get

[src/cacheing-client.ts:46-49](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/cacheing-client.ts#L46-L49 "Source code on GitHub")
[src/cacheing-client.ts:46-49](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L46-L49 "Source code on GitHub")

Gets an item in the cache

Expand All @@ -91,7 +92,7 @@ Returns **any** {\*}

##### memoise

[src/cacheing-client.ts:59-71](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/cacheing-client.ts#L59-L71 "Source code on GitHub")
[src/cacheing-client.ts:59-71](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L59-L71 "Source code on GitHub")

Memoises an arbitrary function using the cache

Expand All @@ -103,7 +104,7 @@ Returns **any** {T} Memoised version of the function

##### set

[src/cacheing-client.ts:81-85](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/cacheing-client.ts#L81-L85 "Source code on GitHub")
[src/cacheing-client.ts:81-85](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L81-L85 "Source code on GitHub")

Sets an item in the cache

Expand All @@ -117,15 +118,15 @@ Returns **void**&#x20;

##### stop

[src/cacheing-client.ts:92-94](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/cacheing-client.ts#L92-L94 "Source code on GitHub")
[src/cacheing-client.ts:92-94](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L92-L94 "Source code on GitHub")

Empties the cache

Returns **void**&#x20;

##### createCacheKey

[src/cacheing-client.ts:104-106](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/cacheing-client.ts#L104-L106 "Source code on GitHub")
[src/cacheing-client.ts:104-106](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/cacheing-client.ts#L104-L106 "Source code on GitHub")

Util to serialise stuff to use as a cache key

Expand Down Expand Up @@ -190,39 +191,39 @@ const item = await client.getItem({

#### emptyResponseCacheTime

[src/dynamo-client.ts:23-23](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/dynamo-client.ts#L23-L23 "Source code on GitHub")
[src/dynamo-client.ts:23-23](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L23-L23 "Source code on GitHub")

When we get no items back from a query we will not retry the query within this time (ms)

Type: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)

#### queryConcurrency

[src/dynamo-client.ts:30-30](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/dynamo-client.ts#L30-L30 "Source code on GitHub")
[src/dynamo-client.ts:30-30](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L30-L30 "Source code on GitHub")

Limit concurrently sent queries to this value

Type: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)

#### getConcurrency

[src/dynamo-client.ts:37-37](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/dynamo-client.ts#L37-L37 "Source code on GitHub")
[src/dynamo-client.ts:37-37](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L37-L37 "Source code on GitHub")

Limit concurrent getItem calls to this value

Type: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)

#### DynamoCachedClient

[src/dynamo-client.ts:47-173](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/dynamo-client.ts#L47-L173 "Source code on GitHub")
[src/dynamo-client.ts:47-173](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L47-L173 "Source code on GitHub")

**Extends CacheingClient**

Client for dynamo tables. Makes dynamo requests and caches the results.

##### getItem

[src/dynamo-client.ts:82-109](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/dynamo-client.ts#L82-L109 "Source code on GitHub")
[src/dynamo-client.ts:82-109](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L82-L109 "Source code on GitHub")

Gets a single item from the table by key and caches the result

Expand All @@ -234,7 +235,7 @@ Returns **any** {(Promise\<T | undefined>)}

##### query

[src/dynamo-client.ts:119-133](https://github.com/bbeesley/bags-of-cache/blob/c25486e7861143f9c3fe9d0e594c131dde0c89ce/src/dynamo-client.ts#L119-L133 "Source code on GitHub")
[src/dynamo-client.ts:119-133](https://github.com/bbeesley/bags-of-cache/blob/9868d0c635ee46e26d2f484363b9a4c3357469ec/src/dynamo-client.ts#L119-L133 "Source code on GitHub")

Sends an arbitrary dynamo query, cacheing the results

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/cacheing_client.CacheingClient.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@beesley/bags-of-cache - v1.0.0](../README.md) / [Modules](../modules.md) / [cacheing-client](../modules/cacheing_client.md) / CacheingClient
[@beesley/bags-of-cache - v1.0.1](../README.md) / [Modules](../modules.md) / [cacheing-client](../modules/cacheing_client.md) / CacheingClient

# Class: CacheingClient

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/dynamo_client.DynamoCachedClient.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@beesley/bags-of-cache - v1.0.0](../README.md) / [Modules](../modules.md) / [dynamo-client](../modules/dynamo_client.md) / DynamoCachedClient
[@beesley/bags-of-cache - v1.0.1](../README.md) / [Modules](../modules.md) / [dynamo-client](../modules/dynamo_client.md) / DynamoCachedClient

# Class: DynamoCachedClient

Expand Down
4 changes: 2 additions & 2 deletions docs/modules.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[@beesley/bags-of-cache - v1.0.0](README.md) / Modules
[@beesley/bags-of-cache - v1.0.1](README.md) / Modules

# @beesley/bags-of-cache - v1.0.0
# @beesley/bags-of-cache - v1.0.1

## Table of contents

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/cacheing_client.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@beesley/bags-of-cache - v1.0.0](../README.md) / [Modules](../modules.md) / cacheing-client
[@beesley/bags-of-cache - v1.0.1](../README.md) / [Modules](../modules.md) / cacheing-client

# Module: cacheing-client

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/dynamo_client.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@beesley/bags-of-cache - v1.0.0](../README.md) / [Modules](../modules.md) / dynamo-client
[@beesley/bags-of-cache - v1.0.1](../README.md) / [Modules](../modules.md) / dynamo-client

# Module: dynamo-client

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[@beesley/bags-of-cache - v1.0.0](../README.md) / [Modules](../modules.md) / index
[@beesley/bags-of-cache - v1.0.1](../README.md) / [Modules](../modules.md) / index

# Module: index

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@beesley/bags-of-cache",
"version": "1.0.1",
"version": "1.0.2",
"description": "TTL based in memory cacheing util",
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit b21dac0

Please sign in to comment.