1.3.3 • Published 1 year ago

next-cache v1.3.3

Weekly downloads
88
License
-
Repository
-
Last release
1 year ago

next-cache

This is a server side rendering cache service
It is suitable for clustering and distributed application

environment

node 10.15.3
npm 6.4.1

install

npm install next-cache

start

// server
const NextCache = require("next-cache");
const server = new NextCache.Server({
    port: 666,
});
server.start();

// client
const NextCache = require("next-cache");
const cache = new NextCache.Client("ws://localhost:666");
await cache.connect();
const data = await cache.get(`your_cache_key`, async()=>{
    return await new Promise(resolve => {
        setTimeout(()=>{
            resolve({
                value: 123, // your data
                ttl: 3600,  // time to live, default is one hour
            });
        }, 1000)
    })
})
1.3.3

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.5

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago