simple http server cache (key,value,TTL)
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
api/helpers
node_modules
README.md
app.js
package.json
server.js
web.js

README.md

http server cache

A nodejs app running a simple http server cache

  • Nodejs = 0.10.16
  • Express.js = 3.x.x
  • Git for deploy

1.Run the server:

node server.js 
  1. 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"
    } 
    
  2. Get cache value with:

    http://http-server-cache.eu01.aws.af.cm/?key=isitchristmas&ttl=86400000 HTTP / 1.1 
    
  3. Check results:

    {"Error": "cache missed","HasError": true,"ElapsedTime": "6.4 ms"}
    or
    {"isitchristmas": "NO"}
    

Try the demo site :

 
Demo: get cache for isitchristmas key