Skip to content

Commit 12039b2

Browse files
committed
Update README and bump version
1 parent 44604e7 commit 12039b2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ app.listen(3000);
4242

4343
It works by fetching your asset in between two callbacks on e.g. a route, by attaching a `fetchUrl` onto `res.locals`. When the asset isn't cached on disk already, it will write it into a directory specified by the option `cacheDir`. If it finds a file that's alread there, it will use that.
4444

45-
Currently even when the file is present on disk, a `HEAD` request is necessary to determine `contentType` and `contentLength`, otherwise the response will fail (I will potentially mitigate this by optionally using an SQLite database, for _true_ offline use).
45+
The asset's `contentType` and `contentLength` are stored base64 encoded in the filename, thus no offline database is necessary
4646

4747
Note that setting `cacheKey` and `cacheDir` isn't strictly necessary, it will fall back to `res.local.fetchUrl` and `path.join(process.cwd(), "/tmp")`, respectively.
4848

@@ -137,4 +137,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
137137
<!-- prettier-ignore-end -->
138138
<!-- ALL-CONTRIBUTORS-LIST:END -->
139139

140-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
140+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "express-asset-file-cache-middleware",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "An express.js middleware to locally cache assets (images, videos, audio, etc.) for faster access and proxying, for use in e.g. Electron apps",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)