This is an example project showing the usage of Memcached Spring Boot cache library in a Spring Boot application. You will have to have Docker installed in order to run this demo.
To run the application tests execute this command:
./gradlew test
Build a Docker image for the demo application by running:
./gradlew clean buildDocker
This will create the spring-boot-memcached-demo-kotlin
Docker image in your machine's local Docker image registry.
To start a memcached server and the demo application, run:
docker-compose -f src/main/docker/app.yml up -d
You should now be able to access REST endpoints e.g.
http://localhost:8080/books (not cached)
http://localhost:8080/books/Kotlin (cached)
To stop and remove the containers, run:
docker-compose -f src/main/docker/app.yml down