Cache
Record
Name
Type
Description
Cache class
Cache.file
Cache.get(name)
import { Cache, promisify } from '@empathize/framework';
promisify(async () => {
let record = await Cache.get('not_existing_record');
// Record doesn't exist
console.log(record === null ? 'Record doesn\'t exist' : 'Record exist');
record = await Cache.get('existing_record');
// Record exists
console.log(record === null ? 'Record doesn\'t exist' : 'Record exists');
});Cache.set(name, value, ttl)
Last updated