Skip to content

Commit e92f9ba

Browse files
committed
docs: improve readme
1 parent fd3bb5b commit e92f9ba

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@
2222

2323
Stalier is cache strategy middleware controled by your frontend by using `x-stalier-cache-control` header.
2424
This means that instead of your backend sending `Cache-Control` header to your browser for your browser to cache the returned data, your frontend will send the header `X-Stalier-Cache-Control` to your backend for it to cache the returned data from your source of truth.
25-
It is an advanced middleware that with support for stale-while-revalidate strategy.
26-
Stalier will act as a proxy for your routes and cache the response if front-end asks for it.
27-
Since it's embedded in your backend, it's much more efficient than using a separate proxy.
28-
It implements part of RFC7234 and RFC5861 but on the backend. It does not use `cache-control` since the cache is controlled by the frontend.
29-
If you want both your browser and backend to cache the responses, you can use `x-stalier-cache-control` for requests and `cache-control` for responses at the same time.
25+
26+
- It is an advanced middleware with support for stale-while-revalidate strategy.
27+
- Stalier will act as a proxy that caches the response if it sees a `X-Stalier-Cache-Control` header.
28+
- Since it's embedded in your backend, it's much more efficient than using a separate proxy.
29+
- It implements part of RFC7234 and RFC5861 but on the backend. It does not use `cache-control` since the cache is controlled by the frontend.
30+
- If you want both your browser and backend to cache the responses, you can use `x-stalier-cache-control` for requests and `cache-control` for responses at the same time.
3031

3132
## INSTALL
3233

@@ -56,7 +57,7 @@ var redisCache = cacheManager.caching({ store: redisStore });
5657
// Create a new express app
5758
const app = express();
5859
// add stalier middleware
59-
app.use(stalier({ cachePrefix: 'test', cacheClient: redisCache }));
60+
app.use(stalier({ appName: 'test', cacheClient: redisCache }));
6061
```
6162

6263
## Stalier Options

0 commit comments

Comments
 (0)