You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 27, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+13-48Lines changed: 13 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -47,11 +47,11 @@ module.exports = {
47
47
48
48
|Name|Type|Default|Description|
49
49
|:--:|:--:|:-----:|:----------|
50
-
|**`cacheKey`**|`{Function(options, request) -> {String}}`|`undefined`|Allows you to override default cache key generator.|
50
+
|**`cacheKey`**|`{Function(options, request) -> {String}}`|`undefined`|Allows you to override default cache key generator|
51
51
|**`cacheDirectory`**|`{String}`|`path.resolve('.cache-loader')`|Provide a cache directory where cache items should be stored (used for default read/write implementation)|
52
-
|**`cacheIdentifier`**|`{String}`|`cache-loader:{version} {process.env.NODE_ENV}`|Provide an invalidation identifier which is used to generate the hashes. You can use it for extra dependencies of loaders. (used for default read/write implementation)|
53
-
|**`write`**|`{Function(cacheKey, data, callback) -> {void}}`|`undefined`|Allows you to override default write cache data to file (e.g. Redis, memcached).|
54
-
|**`read`**|`{Function(cacheKey, callback) -> {void}}`|`undefined`|Allows you to override default read cache data from file.|
52
+
|**`cacheIdentifier`**|`{String}`|`cache-loader:{version} {process.env.NODE_ENV}`|Provide an invalidation identifier which is used to generate the hashes. You can use it for extra dependencies of loaders (used for default read/write implementation)|
53
+
|**`write`**|`{Function(cacheKey, data, callback) -> {void}}`|`undefined`|Allows you to override default write cache data to file (e.g. Redis, memcached)|
54
+
|**`read`**|`{Function(cacheKey, callback) -> {void}}`|`undefined`|Allows you to override default read cache data from file|
55
55
56
56
<h2align="center">Examples</h2>
57
57
@@ -73,40 +73,16 @@ module.exports = {
73
73
}
74
74
```
75
75
76
-
### `Options`
76
+
### `Database Integration`
77
77
78
78
**webpack.config.js**
79
79
```js
80
-
module.exports= {
81
-
module: {
82
-
rules: [
83
-
{
84
-
test:/\.js$/,
85
-
use: [
86
-
{
87
-
loader:'cache-loader',
88
-
options: {
89
-
cacheDirectory:path.resolve('.cache')
90
-
}
91
-
},
92
-
'babel-loader'
93
-
],
94
-
include:path.resolve('src')
95
-
}
96
-
]
97
-
}
98
-
}
99
-
```
100
-
101
-
### Database Intergration
102
-
103
-
**webpack.config.js**
104
-
```js
105
-
constredis=require('redis'); // Or different database client - memcached, mongodb, ...
80
+
// Or different database client - memcached, mongodb, ...
0 commit comments