Skip to content

RafalWilinski/cachr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cachr Build Status

Simple HTTP Caching proxy implementation in pure C.

Compiling

cmake .
make

Running

  1. Edit config.ini file or create your own
  2. Run with ./cachr command. You can optionally supply own config by passing it as argument to executable. E.g. ./cachr new_config.ini

Using

You can test solution with following command:

./test/request.sh

or

curl localhost:3001/one_second -w %{time_connect}:%{time_starttransfer}:%{time_total} & 
curl localhost:3001/one_second -w %{time_connect}:%{time_starttransfer}:%{time_total} &

First request response time should be considerably bigger than subsequent calls' response time.

Todo

  • Add/implement stack (stack will indicate empty positions in fds array)
  • Make requests to target
  • Store request results in dictionary
  • CRON-like mechanism for freeing memory in dicitonary
  • Returning dict contents if possible
  • Tests

License

MIT License © Marcin Elantkowski, Rafał Wiliński

Libraries Used

Releases

No releases published

Packages

No packages published

Languages