Files
services/examples/cache/set/node/setAValue.js

14 lines
342 B
JavaScript
Executable File

const { CacheService } = require("micro-js-client/cache");
// Set an item in the cache. Overwrites any existing value already set.
async function setAvalue() {
let cacheService = new CacheService(process.env.MICRO_API_TOKEN);
let rsp = await cacheService.set({
key: "foo",
value: "bar",
});
console.log(rsp);
}
setAvalue();