open-index/open-npm huggingface dataset:
npm package: @fisapool/github-cache-service
Description: Efficient caching service with timeout support for API requests
Author: Your Name
Latest version: 0.1.0

# GitHub Cache Service

A flexible and efficient caching utility for client-side applications.

[![npm version](https://img.shields.io/npm/v/@fisapool/github-cache-service.svg)](https://www.npmjs.com/package/@fisapool/github-cache-service)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Features

- In-memory cache with optional localStorage persistence
- Automatic cache expiration
- TypeScript support with generics
- Singleton instance or create your own

## Installation

\\\ash
npm install @fisapool/github-cache-service
\\\

## Usage

### Basic Usage

\\\	ypescript
import { cachingService } from '@fisapool/github-cache-service';

// Store data with default options (in-memory only)
cachingService.set('userData', { name: 'John', id: 123 });

// Retrieve data
const userData = cachingService.get('userData');
console.log(userData); // { name: 'John', id: 123 }

// Remove item from cache
cachingService.remove('userData');

// Clear entire cache
cachingService.clear();
\\\

### With Expiration & LocalStorage

\\\	ypescript
// Store data with 5 minute expiration and localStorage persistence
cachingService.set('userData', { name: 'John', id: 123 }, { 
  expirationTime: 5 * 60 * 1000, // 5 minutes in milliseconds
  useLocalStorage: true 
});

// Retrieve with same options
const userData = cachingService.get('userData', { 
  useLocalStorage: true 
});
\\\

## License

MIT © [fisapool](https://github.com/fisapool)