UNPKG
react-simple-api
Version:
latest (1.4.19)
1.4.19
1.4.18
1.4.17
1.4.16
1.4.15
1.4.14
1.4.13
1.4.12
1.4.11
1.4.10
1.4.9
1.4.8
1.4.7
1.4.6
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.2
1.3.1
1.3.0
1.2.12
1.2.11
1.2.10
1.2.9
1.2.8
1.2.7
1.2.6
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
Create and cache API requests and responses
github.com/sbjovanovski/react-api
sbjovanovski/react-api
react-simple-api
/
dist
/
esm
/
cache.d.ts
10 lines
(9 loc)
•
302 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
declare
class
ApiCache
<T =
void
> {
private
apiResponses;
private
static
instance;
static
getInstance
():
ApiCache
;
getCachedResponse
(
id
:
string
): T |
undefined
;
setCachedResponse
(
id
:
string
,
data
: T,
cacheExpiry
?:
number
): T;
private
deleteCachedResponse; }
export
{
ApiCache
};