react-apollo-idle-cache-eviction
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

react-apollo-idle-cache-eviction

Hooks for performing cache eviction when the user is detected to be idle.

NPM

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

/react-apollo-idle-cache-eviction/

    Package Sidebar

    Install

    npm i react-apollo-idle-cache-eviction

    Weekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    15.1 kB

    Total Files

    10

    Last publish

    Collaborators

    • sean.heintz