mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
style: formatted code
This commit is contained in:
parent
ab68a9f756
commit
1f884e9de5
@ -1,20 +1,9 @@
|
||||
# Result
|
||||
|
||||
Run at Tue, 01 Feb 2022 16:36:36 GMT
|
||||
Commit: 27b9a4972cb3bd56f1246db5b5e15136b7bd07e9
|
||||
Run at Tue, 01 Feb 2022 16:36:36 GMT Commit: 27b9a4972cb3bd56f1246db5b5e15136b7bd07e9
|
||||
|
||||
CACHE INTERCEPTOR Operations: 42851/s Network requests: 1 of 211656 Performance: 100%
|
||||
|
||||
CACHE INTERCEPTOR
|
||||
Operations: 42851/s
|
||||
Network requests: 1 of 211656
|
||||
Performance: 100%
|
||||
CACHE ADAPTER Operations: 37717/s Network requests: 2 of 183672 Performance: 88%
|
||||
|
||||
CACHE ADAPTER
|
||||
Operations: 37717/s
|
||||
Network requests: 2 of 183672
|
||||
Performance: 88%
|
||||
|
||||
AXIOS
|
||||
Operations: 1591/s
|
||||
Network requests: 7976 of 7976
|
||||
Performance: 4%
|
||||
AXIOS Operations: 1591/s Network requests: 7976 of 7976 Performance: 4%
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
# Usage and Examples
|
||||
|
||||
There are some other examples in the [examples]([https://](https://github.com/arthurfiorette/axios-cache-interceptor/tree/main/examples), check them out! You can also make a PR to add some more.
|
||||
There are some other examples in the
|
||||
[examples]([https://](https://github.com/arthurfiorette/axios-cache-interceptor/tree/main/examples),
|
||||
check them out! You can also make a PR to add some more.
|
||||
|
||||
## Applying
|
||||
|
||||
|
||||
@ -46,4 +46,4 @@ app.get('/cache/:id/get', async (req, res) => {
|
||||
res.json(cache);
|
||||
});
|
||||
|
||||
app.listen(3000);
|
||||
app.listen(3000);
|
||||
|
||||
@ -8,9 +8,7 @@ import Axios from 'axios';
|
||||
import { createContext, useContext, useState } from 'react';
|
||||
import { setupCache } from '../../src'; // axios-cache-interceptor
|
||||
|
||||
/**
|
||||
* @type {import('react').Context<import('../../src').AxiosCacheInstance>}
|
||||
*/
|
||||
/** @type {import('react').Context<import('../../src').AxiosCacheInstance>} */
|
||||
const AxiosContext = createContext(null);
|
||||
|
||||
export const useAxios = () => useContext(AxiosContext);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user