https://gibme-npm.github.io/cache
import Memory from '@gibme/cache/memory';
(async () => {
const client = new Memory();
await client.set('somekey', { some: 'value' });
const value = await client.get('somekey');
if (value) {
console.log(value);
}
await client.disconnect();
})();
import Redis from '@gibme/cache/redis';
(async () => {
const client = new Redis({
host: 'localhost',
username: 'someuser',
password: 'somepassword'
});
await client.set('somekey', { some: 'value' });
const value = await client.get('somekey');
if (value) {
console.log(value);
}
await client.disconnect();
})();