0.0.41 • Published 4 months ago

@mozeyinedu/cache v0.0.41

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

Cache

Description

Cache is a class use for local file storage of data to reduce the number of time database queried

How to use Cache

    const Cache = require('@mozeyinedu/cache');
    const cachedProfileFilePath = path.join(__rootdir, 'src/profile/controls')
    const cachedProfileFileName = 'cache.json';
    const cache = new Cache(cachedProfileFilePath, cachedProfileFileName, 'user_id')

    // the different methods

    await cache.get([id, id, id])
    await cache.getAll()
    await cache.getOne(id)
    await cache.store(data)
    await cache.update(id)
    await cache.delete(id)
    await cache.remove(id)
0.0.41

4 months ago

0.0.4

4 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago