RafalWilinski / cachr

📟 Simple HTTP Caching proxy in Clang

Home Page:rwilinski.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

📟 Simple HTTP Caching proxy in Clang

rwilinski.me


Languages

Language:C 99.1%Language:CMake 0.4%Language:Python 0.3%Language:Shell 0.2%