@thi.ng/cache 2.1.101 → 2.1.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-02-22T11:59:16Z
3
+ - **Last updated**: 2024-03-02T14:05:53Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -1,16 +1,5 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
  <!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
3
- > [!IMPORTANT]
4
- > ‼️ Announcing the thi.ng user survey 2024 📋
5
- >
6
- > [Please participate in the survey here!](https://forms.gle/XacbSDEmQMPZg8197)\
7
- > (open until end of February)
8
- >
9
- > **To achieve a better sample size, I'd highly appreciate if you could
10
- > circulate the link to this survey in your own networks.**
11
- >
12
- > [Discussion](https://github.com/thi-ng/umbrella/discussions/447)
13
-
14
3
  # ![@thi.ng/cache](https://media.thi.ng/umbrella/banners-20230807/thing-cache.svg?ea002c07)
15
4
 
16
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/cache.svg)](https://www.npmjs.com/package/@thi.ng/cache)
@@ -22,7 +11,7 @@
22
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
23
12
  > and anti-framework.
24
13
  >
25
- > 🚀 Help me to work full-time on these projects by [sponsoring me on
14
+ > 🚀 Please help me to work full-time on these projects by [sponsoring me on
26
15
  > GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
27
16
 
28
17
  - [About](#about)
@@ -227,8 +216,10 @@ instance's default (provided via ctor option arg). If no instance TTL is
227
216
  given, TTL defaults to 1 hour.
228
217
 
229
218
  ```ts
219
+ import { TLRUCache } from "@thi.ng/cache";
220
+
230
221
  // same opts as LRUCache, but here with custom TTL period (in ms)
231
- tlru = new cache.TLRUCache(null, { ttl: 10000 });
222
+ tlru = new TLRUCache(null, { ttl: 10000 });
232
223
 
233
224
  // with item specific TTL (500ms)
234
225
  tlru.set("foo", 42, 500)
@@ -239,8 +230,10 @@ tlru.set("foo", 42, 500)
239
230
  Similar to LRU, but removes most recently accessed items first. [Wikipedia](https://en.wikipedia.org/wiki/Cache_replacement_policies#Most_recently_used_(MRU))
240
231
 
241
232
  ```ts
233
+ import { MRUCache } from "@thi.ng/cache";
234
+
242
235
  // same opts as LRUCache
243
- mru = new cache.MRUCache();
236
+ mru = new MRUCache();
244
237
  ```
245
238
 
246
239
  ## Authors
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/cache",
3
- "version": "2.1.101",
3
+ "version": "2.1.103",
4
4
  "description": "In-memory cache implementations with ES6 Map-like API and different eviction strategies",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,9 +35,9 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.9.26",
39
- "@thi.ng/dcons": "^3.2.96",
40
- "@thi.ng/transducers": "^8.9.7"
38
+ "@thi.ng/api": "^8.9.27",
39
+ "@thi.ng/dcons": "^3.2.98",
40
+ "@thi.ng/transducers": "^8.9.9"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@microsoft/api-extractor": "^7.40.1",
@@ -90,5 +90,5 @@
90
90
  ],
91
91
  "year": 2018
92
92
  },
93
- "gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
93
+ "gitHead": "df9e312af741d87e6b450afcfea6a6e381662b1e\n"
94
94
  }