react-apollo-idle-cache-eviction
v1.0.1react-apollo-idle-cache-eviction
Hooks for performing cache eviction when the user is detected to be idle.
Install
npm install --save react-apollo-idle-cache-eviction
Usage
import React, { Component } from 'react'
import { useIdleCacheEviction } from 'react-apollo-idle-cache-eviction'
const AppRoot = () => {
useIdleCacheEviction({
checkInterval: 10 * 1000,
minimumIdleMs: 30 * 1000,
onCacheClear: () => console.log("Cleared!")
});
return (
<div>This is a page.</div>
)
}
License
MIT © Senney
npm i react-apollo-idle-cache-eviction
Source Code
github.com/Senney/react-apol...Metadata
- MIT
- >=10
- Senney
- released 6/3/2020