Skip to content

Commit 1e78b4b

Browse files
committed
Fixing readme issues
Removing the need for `emitDecoratorMetadata` option
1 parent da1ad10 commit 1e78b4b

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ The current storage methods are:
1111

1212
## Prerequisites
1313

14-
Enable `emitDecoratorMetadata` and `experimentalDecorators` in your `tsconfig.json`
14+
Enable `experimentalDecorators` in your `tsconfig.json`
1515

1616
{
1717
"compilerOptions": {
18-
...
19-
"emitDecoratorMetadata": true,
18+
...,
2019
"experimentalDecorators": true
2120
}
2221
}
@@ -49,7 +48,7 @@ value is cached
4948
## Limitations
5049

5150
It's not possible to store complex objects using `StorageCache` or `SessionCache`, like it is using `MemoryCache`. If
52-
the object stored has methods or any other fancy stuff, this will likely not work.
51+
the object stored has methods or any other fancy stuff, this will most likely not work.
5352

5453
As for now, the only complex return types possible for cache based on Storage is a `Promise`.
5554

@@ -169,7 +168,7 @@ has a mandatory input which can be a key, or a `CacheOptions` object. If you def
169168
these values will be used as default values for the method decorators.
170169

171170

172-
###`@MemoryCache` usage with `@CacheContainer`, `CacheOptions` and the `MethodCacheService`:
171+
### `@MemoryCache` usage with `@CacheContainer`, `CacheOptions` and the `MethodCacheService`:
173172

174173

175174
@CacheContainer({key: 'TestContainer', ttl: 1})
@@ -226,7 +225,7 @@ only twice, because this cache expires after 5 seconds.
226225

227226
The `clearMemoryContainer` clears all the cache present in the `CacheContainer`.
228227

229-
###`@SessionCache(options: CacheOptions | string)`
228+
### `@SessionCache(options: CacheOptions | string)`
230229

231230
This uses the browser's native `SessionStorage`. Therefor it is limited to the browser environment only. And with it comes
232231
the limitations of storage. You can only store static objects or Promises using this decorator. To store a promise, set
@@ -236,6 +235,6 @@ You can also set the `returnType` as part of a `CacheContainer`. A method decora
236235

237236
The rest is the same as `@MethodCache`
238237

239-
###`@StorageCache(options: CacheOptions | string)`
238+
### `@StorageCache(options: CacheOptions | string)`
240239
The same as `@SessionCache`, but instead of the browser's native `SessionStorage` it uses the `LocalStorage` of the
241240
browser. This can only be used inside the browser.

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"noImplicitAny": false,
99
"strictNullChecks": true,
1010
"sourceMap": false,
11-
"emitDecoratorMetadata": true,
1211
"experimentalDecorators": true,
1312
"outDir": "./dist",
1413
"rootDir": "./src",

0 commit comments

Comments
 (0)