https://github.com/ulbora/ulboracacheservice
An in-memory cache service with a REST interface based on freecache
https://github.com/ulbora/ulboracacheservice
Last synced: 3 months ago
JSON representation
An in-memory cache service with a REST interface based on freecache
- Host: GitHub
- URL: https://github.com/ulbora/ulboracacheservice
- Owner: Ulbora
- License: mit
- Created: 2017-09-15T02:26:02.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-09T17:43:32.000Z (about 8 years ago)
- Last Synced: 2025-07-25T21:57:55.879Z (11 months ago)
- Language: Go
- Homepage:
- Size: 5.21 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://goreportcard.com/report/github.com/Ulbora/UlboraCacheService)
Ulbora Cache Service
==============
An in-memory cache micro service based on freecache https://github.com/coocood/freecache.
Designed for use as a linked Docker container; therefore has no security added.
## Headers
- Content-Type: application/json (for POST and PUT)
## Set Value
```
POST:
URL: http://localhost:3010/rs/cache/set
Example Request
{
"key": "testkey1",
"value": "kens test value"
}
```
```
Example Response
{
"success": true
}
```
## Get Value
```
GET:
URL: http://localhost:3010/rs/cache/get/testkey1
```
```
Example Response
{
"success": true,
"value": "kens test value"
}
```
## Set JSON Value as Base 64
```
POST:
URL: http://localhost:3010/rs/cache/set
Example Request
{
"key": "testkey1",
"value": "ew0KICAgInNvbWVBdHRyIjoic29tZVZhbCIsDQogICAiYW5vdGhlckF0dHIiOiJhbm90aGVyVmFsIg0KfQ=="
}
```
```
Example Response
{
"success": true
}
```
## Get JSON Value as Base 64
```
GET:
URL: http://localhost:3010/rs/cache/get/testkey1
```
```
Example Response
{
"success": true,
"value": "ew0KICAgInNvbWVBdHRyIjoic29tZVZhbCIsDQogICAiYW5vdGhlckF0dHIiOiJhbm90aGVyVmFsIg0KfQ=="
}
```
## Get Value not found
```
GET:
URL: http://localhost:3010/rs/cache/get/testkey1
```
```
Example Response
{
"success": false,
"value": ""
}
```
## Delete Value
```
DELETE:
URL: http://localhost:3010/rs/cache/delete/testkey1
```
```
Example Response
{
"success": true
}
```
# Docker use
```
docker run --network=ulbora_bridge --name cache --log-opt max-size=50m --restart=always -d ulboralabs/cache sh
```