Cache bundle


Installation

Follow these steps to install and configure the DynamoDB bundle :
Ref : Cache bundle documentation

Available functions

Base link : from "@phpcreation/frontend-dynamodb-react-nextjs-bundle";

From /

import {
    storeToCache,
    getCachedData,
    deleteSpecificCacheKey
} 

key

The key should follow the naming convention : Naming convention
const key = "demo_1_1_present-cache-bundle";

storeToCache

Store an object in cache.
Signature
const storeToCache = async (key: string, data: any)

Usage
storeToCache(key, "1");


getCachedData

Get an object from cache.
Signature
const getCachedData = async (key: string)

Usage
getCachedData(key);


deleteSpecificCacheKey

Delete an object from cache.
Signature
const deleteSpecificCacheKey = async (key: string)

Usage
deleteSpecificCacheKey(key);