React Caches is a lightweight and easy-to-use package that simplifies the management of local storage and cache storage in your React-based applications. With this package, you can easily access and manage data stored in local storage, cache storage, and other local storage used by JavaScript.
Easily store and retrieve data in local storage using simple APIs.
Manage cache storage with straightforward methods, allowing you to handle data caching effortlessly.
Designed to work smoothly with React applications, enabling you to enhance data handling on the client:side.
The package is lightweight, ensuring it doesn't introduce unnecessary overhead to your application.
The package offers intuitive APIs, making it user:friendly for developers of all levels.
npm install react-caches@latestimport { CacheStorage } from "react-caches"; // Import Main CacheStorage Object
const CacheStorage = new CacheStorage("DatabaseName"); // Create a new CacheStorage Object
const { receiveCache, saveCacheData, deleteCache, updateCache, clearCache } =
CacheStorage; // Import all CacheStorage functions
const Data = await receiveCache("Searchkey"); // Receive Cache Data from Cache Storage by Database Name and Search Key
const Response = await saveCacheData("Searchkey", Data); // Save Cache Data to Cache Storage by Database Name and Search Key
const Response = await deleteCache("Searchkey"); // Delete Cache Data from Cache Storage by Database Name and Search Key
const Response = await updateCache("Searchkey", Data); // Update Cache Data in Cache Storage by Database Name and Search Key
const Response = await clearCache(); // Clear Cache Data from Cache Storage by Database Name