Skip to content

etido/http-server-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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"
} 
  1. Get cache value with:
http://http-server-cache.eu01.aws.af.cm/?key=isitchristmas&ttl=86400000 HTTP / 1.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

About

simple http server cache (key,value,TTL)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published