https://github.com/rafalwilinski/cachr
📟 Simple HTTP Caching proxy in Clang
https://github.com/rafalwilinski/cachr
c cache clang cmake proxy reverse-proxy
Last synced: over 1 year ago
JSON representation
📟 Simple HTTP Caching proxy in Clang
- Host: GitHub
- URL: https://github.com/rafalwilinski/cachr
- Owner: RafalWilinski
- Created: 2016-11-06T18:52:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-23T16:22:44.000Z (over 9 years ago)
- Last Synced: 2025-03-26T20:57:21.953Z (over 1 year ago)
- Topics: c, cache, clang, cmake, proxy, reverse-proxy
- Language: C
- Homepage: rwilinski.me
- Size: 129 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Cachr [](https://travis-ci.org/RafalWilinski/cachr)
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:
```bash
./test/request.sh
```
or
```bash
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
- [x] Add/implement stack (stack will indicate empty positions in `fds` array)
- [x] Make requests to target
- [x] Store request results in dictionary
- [x] CRON-like mechanism for freeing memory in dicitonary
- [x] Returning dict contents if possible
- [x] Tests
### License
[MIT License](https://opensource.org/licenses/MIT) © Marcin Elantkowski, Rafał Wiliński
### Libraries Used
- [inih](https://github.com/benhoyt/inih)
- [uthash](https://github.com/troydhanson/uthash)