https://github.com/dusanov/a-cache-machine
exercise in java key value caching
https://github.com/dusanov/a-cache-machine
gradle java lfu-cache linkedhashmap lru-cache priority-queue
Last synced: 7 months ago
JSON representation
exercise in java key value caching
- Host: GitHub
- URL: https://github.com/dusanov/a-cache-machine
- Owner: dusanov
- License: mit
- Created: 2025-02-07T06:53:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-08T10:58:43.000Z (11 months ago)
- Last Synced: 2025-06-04T05:51:47.469Z (8 months ago)
- Topics: gradle, java, lfu-cache, linkedhashmap, lru-cache, priority-queue
- Language: Dockerfile
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# a-cache-machine
exercise in java caching
### Testing the Server
1. Start the server:
```
./gradlew run
```
2. Use `telnet` to connect to the server:
```
telnet localhost 6379
```
3. Send RESP commands:
- **PING**:
```
*1\r\n$4\r\nPING\r\n
```
Response:
```
+PONG\r\n
```
- **SET**:
```
*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n
```
Response:
```
+OK\r\n
```
- **GET**:
```
*2\r\n$3\r\nGET\r\n$3\r\nkey\r\n
```
Response:
```
$5\r\nvalue\r\n
```
- **DEL**:
```
*3\r\n$3\r\nDEL\r\n$3\r\nkey\r\n$6\r\nkey2\r\n
```
Response:
```
:1\r\n
```