@nocobase/cache 0.20.0-alpha.9 → 0.21.0-alpha.2

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.
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @experimental
3
+ */
1
4
  export interface BloomFilter {
2
5
  reserve(key: string, errorRate: number, capacity: number): Promise<void>;
3
6
  add(key: string, val: string): Promise<void>;
@@ -1,5 +1,8 @@
1
1
  import { BloomFilter as IBloomFilter } from '.';
2
2
  import { Cache } from '../cache';
3
+ /**
4
+ * @experimental
5
+ */
3
6
  export declare class MemoryBloomFilter implements IBloomFilter {
4
7
  cache: Cache;
5
8
  constructor(cache: Cache);
@@ -1,6 +1,9 @@
1
1
  import { RedisStore } from 'cache-manager-redis-yet';
2
2
  import { BloomFilter } from '.';
3
3
  import { Cache } from '../cache';
4
+ /**
5
+ * @experimental
6
+ */
4
7
  export declare class RedisBloomFilter implements BloomFilter {
5
8
  cache: Cache;
6
9
  constructor(cache: Cache);
@@ -15,7 +15,13 @@ export type CacheManagerOptions = Partial<{
15
15
  export declare class CacheManager {
16
16
  defaultStore: string;
17
17
  private stores;
18
+ /**
19
+ * @internal
20
+ */
18
21
  storeTypes: Map<string, StoreOptions>;
22
+ /**
23
+ * @internal
24
+ */
19
25
  caches: Map<string, Cache>;
20
26
  constructor(options?: CacheManagerOptions);
21
27
  private createStore;
@@ -32,6 +38,9 @@ export declare class CacheManager {
32
38
  getCache(name: string): Cache;
33
39
  flushAll(): Promise<void>;
34
40
  close(): Promise<void>;
41
+ /**
42
+ * @experimental
43
+ */
35
44
  createBloomFilter(options?: {
36
45
  store?: string;
37
46
  }): Promise<BloomFilter>;
@@ -41,7 +41,13 @@ var import_redis_bloom_filter = require("./bloom-filter/redis-bloom-filter");
41
41
  const _CacheManager = class _CacheManager {
42
42
  defaultStore;
43
43
  stores = /* @__PURE__ */ new Map();
44
+ /**
45
+ * @internal
46
+ */
44
47
  storeTypes = /* @__PURE__ */ new Map();
48
+ /**
49
+ * @internal
50
+ */
45
51
  caches = /* @__PURE__ */ new Map();
46
52
  constructor(options) {
47
53
  const defaultOptions = {
@@ -124,6 +130,9 @@ const _CacheManager = class _CacheManager {
124
130
  }
125
131
  await Promise.all(promises);
126
132
  }
133
+ /**
134
+ * @experimental
135
+ */
127
136
  async createBloomFilter(options) {
128
137
  const name = "bloom-filter";
129
138
  const { store = this.defaultStore } = options || {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/cache",
3
- "version": "0.20.0-alpha.9",
3
+ "version": "0.21.0-alpha.2",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./lib/index.js",
@@ -18,5 +18,5 @@
18
18
  "url": "git+https://github.com/nocobase/nocobase.git",
19
19
  "directory": "packages/cache"
20
20
  },
21
- "gitHead": "5473d9039cfdb649a8c8c625edefc9a3ac464be5"
21
+ "gitHead": "90628f2e2da846208fb2d7966ddb4e467d187ffb"
22
22
  }