#http server cache
- Nodejs = 0.10.16
- Express.js = 3.x.x
- Git for deploy
1.Run the server:
node server.js
- Put cache pair key-value with TTL(in ms):
POST http://http-server-cache.eu01.aws.af.cm/?key=isitchristmas&ttl=86400000 HTTP / 1.1 User - Agent : Fiddler Host: http - server - cache.eu01.aws.af.cm Content - Length: 23 { "isitchristmas": "NO" }
- Get cache value with:
http://http-server-cache.eu01.aws.af.cm/?key=isitchristmas&ttl=86400000 HTTP / 1.1
- Check results:
{"Error": "cache missed","HasError": true,"ElapsedTime": "6.4 ms"} or {"isitchristmas": "NO"}##Try the demo site :
Demo: get cache for isitchristmas key